table of contents
std::experimental::optional< _Tp >(3cxx) | std::experimental::optional< _Tp >(3cxx) |
NAME¶
std::experimental::optional< _Tp >
SYNOPSIS¶
Inherits std::experimental::_Optional_base< _Tp >, and std::_Enable_copy_move< is_copy_constructible< _Tp >::value, __and_< is_copy_constructible< _Tp >, is_copy_assignable< _Tp > >::value, is_move_constructible< _Tp >::value, __and_< is_move_constructible< _Tp >, is_move_assignable< _Tp > >::value, optional< _Tp > >.
Public Types¶
using value_type = _Tp
Public Member Functions¶
template<typename... _Args> void emplace (_Args
&&... __args)
template<typename _Up , typename... _Args> enable_if_t<
is_constructible< _Tp, initializer_list< _Up > &, _Args
&&... >::value > emplace (initializer_list<
_Up > __il, _Args &&... __args)
constexpr operator bool () const noexcept
constexpr const _Tp & operator* () const &
constexpr _Tp & operator* () &
constexpr _Tp && operator* () &&
constexpr const _Tp && operator* () const &&
constexpr const _Tp * operator-> () const
_Tp * operator-> ()
optional & operator= (nullopt_t) noexcept
template<typename _Up > enable_if_t< is_same< _Tp, decay_t< _Up
> >::value, optional & > operator= (_Up
&&__u)
void swap (optional &__other)
noexcept(is_nothrow_move_constructible< _Tp >()
&&noexcept(swap(declval< _Tp &>(), declval< _Tp
&>())))
constexpr const _Tp & value () const &
constexpr _Tp & value () &
constexpr _Tp && value () &&
constexpr const _Tp && value () const &&
template<typename _Up > constexpr _Tp value_or (_Up
&&__u) const &
template<typename _Up > _Tp value_or (_Up &&__u)
&&
Private Member Functions¶
void _M_construct (_Args &&... __args)
noexcept(is_nothrow_constructible< _Stored_type, _Args... >())
void _M_destruct ()
constexpr _Tp & _M_get () noexcept
constexpr const _Tp & _M_get () const noexcept
constexpr bool _M_is_engaged () const noexcept
void _M_reset ()
Private Attributes¶
_Empty_byte _M_empty
_Stored_type _M_payload
Detailed Description¶
template<typename _Tp>¶
class std::experimental::optional< _Tp >" Class template for optional values.
Definition at line 83 of file optional.
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.
Wed Apr 11 2018 | libstdc++ |