|
| optional () noexcept |
| Default ctor not storing a value.
|
|
| optional (nullopt_t) noexcept |
| Ctor for explicitly not storing a value.
|
|
template<class... ARGS> |
| optional (in_place_t, ARGS &&...args) |
| In-place constructs a new T object.
|
|
template<class U, typename std::enable_if< std::is_assignable< T &, U >::value, int >::type = 0> |
| optional (U &&value) |
| Ctor from an object assignable to T .
|
|
template<class U, typename std::enable_if< std::is_assignable< T &, U >::value, int >::type = 0> |
optional & | operator= (U &&value) |
| Assignment operator for an object assignable to T .
|
|
template<typename std::enable_if< std::is_copy_constructible< T >::value, int >::type = 0> |
| optional (const optional &rhs) |
| Copy ctor.
|
|
template<typename std::enable_if< std::is_copy_assignable< T >::value, int >::type = 0> |
optional & | operator= (const optional &rhs) |
| Copy operator.
|
|
template<typename std::enable_if< std::is_move_constructible< T >::value, int >::type = 0> |
| optional (optional &&rhs) |
| Move ctor.
|
|
template<typename std::enable_if< std::is_move_assignable< T >::value, int >::type = 0> |
optional & | operator= (optional &&rhs) |
| Move operator.
|
|
const T * | operator-> () const noexcept |
| Gets the reference to the stored object.
|
|
T * | operator-> () noexcept |
| Gets the reference to the stored object.
|
|
const T & | operator* () const noexcept |
| Gets the reference to the stored object.
|
|
T & | operator* () noexcept |
| Gets the reference to the stored object.
|
|
| operator bool () const noexcept |
| Gets whether this optional contains a value.
|
|
template<class... ARGS> |
T & | emplace (ARGS &&...args) |
| Constructs a new T in-place.
|
|
bool | has_value () const noexcept |
| Gets whether this optional contains a value.
|
|
void | reset () |
| Destroys any contained value.
|
|
void | swap (optional &other) |
| Swaps this object with the other object.
|
|
const T & | value () const |
| Gets the contained value.
|
|
T & | value () |
| Gets the contained value.
|
|
template<class U, typename std::enable_if< std::is_assignable< T &, U >::value, int >::type = 0> |
T | value_or (U &&default_value) const |
| Gets the contained value if has_value() is true; default_value otherwise.
|
|