.TH "std::_Optional_base< _Tp, bool, bool >" 3cxx "Wed Jul 28 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::_Optional_base< _Tp, bool, bool > \- Class template that provides copy/move constructors of optional\&. .SH SYNOPSIS .br .PP .PP Inherits std::_Optional_base_impl< _Tp, _Dp >\&. .PP Inherited by \fBstd::experimental::fundamentals_v1::optional< _Tp >\fP\fC [private]\fP, and \fBstd::optional< _Tp >\fP\fC [private]\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "constexpr \fB_Optional_base\fP (\fB_Optional_base\fP &&__other) noexcept(is_nothrow_move_constructible_v< _Tp >)" .br .ti -1c .RI "constexpr \fB_Optional_base\fP (const \fB_Optional_base\fP &__other)" .br .ti -1c .RI "template, bool > = false> constexpr \fB_Optional_base\fP (in_place_t, _Args &&\&.\&.\&. __args)" .br .ti -1c .RI "template &, _Args\&.\&.\&. >, bool > = false> constexpr \fB_Optional_base\fP (in_place_t, \fBinitializer_list\fP< _Up > __il, _Args &&\&.\&.\&. __args)" .br .ti -1c .RI "\fB_Optional_base\fP & \fBoperator=\fP (\fB_Optional_base\fP &&)=default" .br .ti -1c .RI "\fB_Optional_base\fP & \fBoperator=\fP (const \fB_Optional_base\fP &)=default" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "_Optional_payload< _Tp > \fB_M_payload\fP" .br .in -1c .SS "Protected Types" .in +1c .ti -1c .RI "using \fB_Stored_type\fP = \fBremove_const_t\fP< _Tp >" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "template void \fB_M_construct\fP (_Args &&\&.\&.\&. __args) noexcept(is_nothrow_constructible_v< _Stored_type, _Args\&.\&.\&. >)" .br .ti -1c .RI "void \fB_M_destruct\fP () noexcept" .br .ti -1c .RI "constexpr const _Tp & \fB_M_get\fP () const noexcept" .br .ti -1c .RI "constexpr _Tp & \fB_M_get\fP () noexcept" .br .ti -1c .RI "constexpr bool \fB_M_is_engaged\fP () const noexcept" .br .ti -1c .RI "constexpr void \fB_M_reset\fP () noexcept" .br .in -1c .SH "Detailed Description" .PP .SS "template, bool = is_trivially_move_constructible_v<_Tp>> .br 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\&. .PP 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\&. .PP Whether the other special members are trivial is determined by the _Optional_payload<_Tp> specialization used for the _M_payload member\&. .PP \fBSee also\fP .RS 4 optional, _Enable_special_members .RE .PP .PP Definition at line 473 of file optional\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.