|
| ~optional () |
|
|
constexpr | optional () noexcept |
|
constexpr | optional (nullopt_t) noexcept |
|
template<class U = value_type, std::enable_if_t< std::is_constructible< value_type, U && >::value, int > = 0, std::enable_if_t< !std::is_convertible< U &&, value_type >::value, int > = 0> |
constexpr | optional (U &&value) |
|
template<class U = value_type, std::enable_if_t< std::is_constructible< value_type, U && >::value, int > = 0, std::enable_if_t< std::is_convertible< U &&, value_type >::value, int > = 0> |
constexpr | optional (U &&value) |
|
| optional (const value_type &value) |
|
| optional (value_type &&value) |
|
template<class... Args> |
constexpr | optional (in_place_t, Args &&... args) |
|
|
| optional (const optional &other) noexcept(std::is_nothrow_copy_constructible< T >::value) |
|
| optional (optional &&other) noexcept(std::is_nothrow_move_constructible< T >::value) |
|
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< !std::is_convertible< const U &, value_type >::value, int > = 0> |
| optional (const optional< U > &other) |
|
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< std::is_convertible< const U &, value_type >::value, int > = 0> |
| optional (const optional< U > &other) |
|
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< !std::is_convertible< const U &, value_type >::value, int > = 0> |
| optional (optional< U > &&other) |
|
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< std::is_convertible< const U &, value_type >::value, int > = 0> |
| optional (optional< U > &&other) |
|
optional & | operator= (nullopt_t) noexcept |
|
optional & | operator= (const optional &other) noexcept(std::is_nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_assignable< T >::value) |
|
optional & | operator= (optional &&other) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value) |
|
template<class U = value_type> |
std::enable_if< std::is_constructible< value_type, U >::value &&std::is_assignable< value_type, U >::value, optional & >::type | operator= (U &&value) |
|
|
constexpr | operator bool () const noexcept |
| return true if optional is engaged, false otherwise More...
|
|
const value_type & | operator* () const noexcept |
| dereference pointer More...
|
|
value_type & | operator* () noexcept |
| dereference pointer More...
|
|
const value_type * | operator-> () const noexcept |
| pointer operator More...
|
|
value_type * | operator-> () noexcept |
| pointer operator More...
|
|
const value_type & | value () const |
|
value_type & | value () |
|
template<class U > |
value_type | value_or (U &&value) const |
|
|
template<class... Args> |
void | emplace (Args &&... args) |
|
void | reset () noexcept |
|
void | swap (optional &other) noexcept(std::is_nothrow_move_constructible< T >::value &&noexcept(std::swap(std::declval< T & >(), std::declval< T & >()))) |
|
template<class T >
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< !std::is_convertible< const U &, value_type >::value, int > = 0>
template<class T >
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< std::is_convertible< const U &, value_type >::value, int > = 0>
template<class T >
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< !std::is_convertible< const U &, value_type >::value, int > = 0>
template<class T >
template<class U , std::enable_if_t< std::is_constructible< value_type, const U & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, const optional< U > & >::value, int > = 0, std::enable_if_t< !std::is_constructible< value_type, optional< U > && >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< const optional< U > &, value_type >::value, int > = 0, std::enable_if_t< !std::is_constructible< optional< U > &&, value_type >::value, int > = 0, std::enable_if_t< std::is_convertible< const U &, value_type >::value, int > = 0>