std::_Optional_base< _Tp, bool, bool >(3cxx) | std::_Optional_base< _Tp, bool, bool >(3cxx) |
std::_Optional_base< _Tp, bool, bool > - Class template that provides copy/move constructors of optional.
Inherits std::_Optional_base_impl< _Tp, _Dp >.
Inherited by std::experimental::fundamentals_v1::optional< _Tp > [private], and std::optional< _Tp > [private].
constexpr _Optional_base (_Optional_base
&&__other) noexcept(is_nothrow_move_constructible_v< _Tp >)
constexpr _Optional_base (const _Optional_base &__other)
template<typename... _Args, enable_if_t< is_constructible_v<
_Tp, _Args... >, bool > = false> constexpr _Optional_base
(in_place_t, _Args &&... __args)
template<typename _Up , typename... _Args, enable_if_t<
is_constructible_v< _Tp, initializer_list< _Up > &,
_Args... >, bool > = false> constexpr _Optional_base
(in_place_t, initializer_list< _Up > __il, _Args &&...
__args)
_Optional_base & operator= (_Optional_base
&&)=default
_Optional_base & operator= (const _Optional_base
&)=default
_Optional_payload< _Tp > _M_payload
using _Stored_type = remove_const_t< _Tp >
template<typename... _Args> constexpr void
_M_construct (_Args &&... __args)
noexcept(is_nothrow_constructible_v< _Stored_type, _Args... >)
constexpr void _M_destruct () noexcept
constexpr const _Tp & _M_get () const noexcept
constexpr _Tp & _M_get () noexcept
constexpr bool _M_is_engaged () const noexcept
constexpr void _M_reset () noexcept
struct std::_Optional_base< _Tp, bool, bool >"Class template that provides copy/move constructors of optional.
Such a separate base class template is necessary in order to conditionally make copy/move constructors trivial.
When the contained value is trivially copy/move constructible, the copy/move constructors of _Optional_base will invoke the trivial copy/move constructor of _Optional_payload. Otherwise, they will invoke _Optional_payload(bool, const _Optional_payload&) or _Optional_payload(bool, _Optional_payload&&) to initialize the contained value, if copying/moving an engaged optional.
Whether the other special members are trivial is determined by the _Optional_payload<_Tp> specialization used for the _M_payload member.
See also
Definition at line 472 of file optional.
Definition at line 410 of file optional.
Definition at line 482 of file optional.
Definition at line 491 of file optional.
Definition at line 499 of file optional.
Definition at line 504 of file optional.
Definition at line 416 of file optional.
Definition at line 424 of file optional.
Definition at line 444 of file optional.
Definition at line 437 of file optional.
Definition at line 432 of file optional.
Definition at line 429 of file optional.
Definition at line 514 of file optional.
Generated automatically by Doxygen for libstdc++ from the source code.
Thu Feb 16 2023 | libstdc++ |