|
|
| 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. More...
|
| |
| 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. More...
|
| |
| 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. More...
|
| |
| template<typename std::enable_if< std::is_copy_constructible< T >::value, int >::type = 0> |
| | optional (const optional &rhs) |
| | Copy ctor. More...
|
| |
| template<typename std::enable_if< std::is_copy_assignable< T >::value, int >::type = 0> |
| optional & | operator= (const optional &rhs) |
| | Copy operator. More...
|
| |
| template<typename std::enable_if< std::is_move_constructible< T >::value, int >::type = 0> |
| | optional (optional &&rhs) |
| | Move ctor. More...
|
| |
| template<typename std::enable_if< std::is_move_assignable< T >::value, int >::type = 0> |
| optional & | operator= (optional &&rhs) |
| | Move operator. More...
|
| |
| const T * | operator-> () const noexcept |
| | Gets the reference to the stored object. More...
|
| |
| T * | operator-> () noexcept |
| | Gets the reference to the stored object. More...
|
| |
| const T & | operator* () const noexcept |
| | Gets the reference to the stored object. More...
|
| |
| T & | operator* () noexcept |
| | Gets the reference to the stored object. More...
|
| |
| | operator bool () const noexcept |
| | Gets whether this optional contains a value. More...
|
| |
| template<class... ARGS> |
| T & | emplace (ARGS &&... args) |
| | Constructs a new T in-place. More...
|
| |
| bool | has_value () const noexcept |
| | Gets whether this optional contains a value. More...
|
| |
|
void | reset () |
| | Destroys any contained value.
|
| |
| void | swap (optional &other) |
| | Swaps this object with the other object. More...
|
| |
| const T & | value () const |
| | Gets the contained value. More...
|
| |
| T & | value () |
| | Gets the contained value. More...
|
| |
| 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. More...
|
| |
template<class T>
class Cvb::Shims::optional< T >
This class is a replacement for C++17 std::optional.