libstdc++

std::experimental::fundamentals_v1::_Optional_base< _Tp, _ShouldProvideDestructor > Class Template Reference

Class template that holds the necessary state for Optional values and that has the responsibility for construction and the special members. More...

List of all members.

Public Member Functions

 _Optional_base (const _Optional_base &__other)
 _Optional_base (_Optional_base &&__other) noexcept(is_nothrow_move_constructible< _Tp >())
template<typename _Up , typename... _Args, enable_if_t< is_constructible< _Tp, initializer_list< _Up > &, _Args &&...>::value, int > ...>
constexpr _Optional_base (in_place_t, initializer_list< _Up > __il, _Args &&...__args)
 _M_engaged (true)
_Optional_baseis_nothrow_move_assignable ())
_Optional_baseoperator= (_Optional_base &&__other) noexcept(__and_< is_nothrow_move_constructible< _Tp >
_Optional_baseoperator= (const _Optional_base &__other)

Protected Member Functions

void _Args ())
template<typename... _Args>
void _M_construct (_Args &&...__args) noexcept(is_nothrow_constructible< _Stored_type
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 ()

Detailed Description

template<typename _Tp, bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value>
class std::experimental::fundamentals_v1::_Optional_base< _Tp, _ShouldProvideDestructor >

Class template that holds the necessary state for Optional values and that has the responsibility for construction and the special members.

Such a separate base class template is necessary in order to conditionally enable the special members (e.g. copy/move constructors). Note that this means that _Optional_base implements the functionality for copy and move assignment, but not for converting assignment.

See also:
optional, _Enable_special_members

Definition at line 205 of file optional.


The documentation for this class was generated from the following file: