#include <genesis/utils/containers/optional.hpp>
Simplistic optional: requires T to be default constructible, copyable.
The implementation is based on https://github.com/martinmoene/optional-bare, which is published under the Boost Software License - Version 1.0, see our Acknowledgements for further details.
Definition at line 178 of file optional.hpp.
Public Member Functions | |
Optional () | |
Optional (nullopt_t) | |
template<class U > | |
Optional (Optional< U > &&other) | |
template<class U > | |
Optional (Optional< U > const &other) | |
Optional (T &&arg) | |
Optional (T const &arg) | |
bool | has_value () const |
operator bool () const | |
value_type & | operator* () |
const value_type & | operator* () const |
value_type * | operator-> () |
const value_type * | operator-> () const |
Optional & | operator= (nullopt_t) |
template<class U > | |
Optional & | operator= (Optional< U > &&other) |
template<class U > | |
Optional & | operator= (Optional< U > const &other) |
Optional & | operator= (T &&other) |
Optional & | operator= (T const &other) |
void | reset () |
void | swap (Optional &rhs) |
value_type & | value () |
const value_type & | value () const |
template<class U > | |
value_type | value_or (U const &v) const |
Public Types | |
typedef T | value_type |
|
inline |
Definition at line 192 of file optional.hpp.
Definition at line 196 of file optional.hpp.
|
inline |
Definition at line 200 of file optional.hpp.
|
inline |
Definition at line 205 of file optional.hpp.
Definition at line 211 of file optional.hpp.
Definition at line 220 of file optional.hpp.
|
inline |
Definition at line 310 of file optional.hpp.
|
inlineexplicit |
Definition at line 305 of file optional.hpp.
|
inline |
Definition at line 299 of file optional.hpp.
|
inline |
Definition at line 293 of file optional.hpp.
|
inline |
Definition at line 287 of file optional.hpp.
|
inline |
Definition at line 281 of file optional.hpp.
Definition at line 228 of file optional.hpp.
Definition at line 259 of file optional.hpp.
Definition at line 249 of file optional.hpp.
|
inline |
Definition at line 241 of file optional.hpp.
|
inline |
Definition at line 234 of file optional.hpp.
|
inline |
Definition at line 343 of file optional.hpp.
|
inline |
Definition at line 268 of file optional.hpp.
|
inline |
Definition at line 324 of file optional.hpp.
|
inline |
Definition at line 315 of file optional.hpp.
|
inline |
Definition at line 334 of file optional.hpp.
typedef T value_type |
Definition at line 186 of file optional.hpp.