.TH "std::experimental::optional< _Tp >" 3cxx "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::experimental::optional< _Tp > \- Class template for optional values\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBstd::_Optional_base< _Tp, bool, bool >\fP, and _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 > >\&. .SS "Public Types" .in +1c .ti -1c .RI "\fBusing\fP \fBvalue_type\fP = _Tp" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "template<\fBtypename\fP _Up = _Tp, \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< \fBoptional\fP< _Tp >, \fBdecay_t\fP< _Up > > >, \fBis_constructible\fP< _Tp, _Up && >, \fBis_convertible\fP< _Up &&, _Tp > >::value, bool > = true> constexpr \fBoptional\fP (_Up &&__t)" .br .ti -1c .RI "template<\fBtypename\fP _Up = _Tp, \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< \fBoptional\fP< _Tp >, \fBdecay_t\fP< _Up > > >, \fBis_constructible\fP< _Tp, _Up && >, __not_< \fBis_convertible\fP< _Up &&, _Tp > > >::value, bool > = false> constexpr \fBoptional\fP (_Up &&__t)" .br .ti -1c .RI "template<\fBtypename\fP _Up , \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, const _Up & >, \fBis_convertible\fP< const _Up &, _Tp >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > > >::value, bool > = true> constexpr \fBoptional\fP (const \fBoptional\fP< _Up > &__t)" .br .ti -1c .RI "template<\fBtypename\fP _Up , \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, const _Up & >, __not_< \fBis_convertible\fP< const _Up &, _Tp > >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > > >::value, bool > = false> constexpr \fBoptional\fP (const \fBoptional\fP< _Up > &__t)" .br .ti -1c .RI "template<\fBtypename\fP _Up , \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, _Up && >, \fBis_convertible\fP< _Up &&, _Tp >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > > >::value, bool > = true> constexpr \fBoptional\fP (\fBoptional\fP< _Up > &&__t)" .br .ti -1c .RI "template<\fBtypename\fP _Up , \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, _Up && >, __not_< \fBis_convertible\fP< _Up &&, _Tp > >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > > >::value, bool > = false> constexpr \fBoptional\fP (\fBoptional\fP< _Up > &&__t)" .br .ti -1c .RI "template \fBenable_if_t\fP< \fBis_constructible\fP< _Tp, \fB_Args\fP &&\&.\&.\&. >::value > \fBemplace\fP (\fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .ti -1c .RI "template<\fBtypename\fP _Up , typename\&.\&.\&. _Args> \fBenable_if_t\fP< \fBis_constructible\fP< _Tp, \fBinitializer_list\fP< _Up > &, \fB_Args\fP &&\&.\&.\&. >::value > \fBemplace\fP (\fBinitializer_list\fP< _Up > \fB__il\fP, \fB_Args\fP &&\&.\&.\&. \fB__args\fP)" .br .ti -1c .RI "constexpr \fBoperator bool\fP () const noexcept" .br .ti -1c .RI "constexpr _Tp & \fBoperator*\fP () &" .br .ti -1c .RI "constexpr _Tp && \fBoperator*\fP () &&" .br .ti -1c .RI "constexpr const _Tp & \fBoperator*\fP () const &" .br .ti -1c .RI "constexpr const _Tp && \fBoperator*\fP () const &&" .br .ti -1c .RI "_Tp * \fBoperator\->\fP ()" .br .ti -1c .RI "constexpr const _Tp * \fBoperator\->\fP () const" .br .ti -1c .RI "template<\fBtypename\fP _Up = _Tp> \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< \fBoptional\fP< _Tp >, \fBdecay_t\fP< _Up > > >, \fBis_constructible\fP< _Tp, _Up >, __not_< __and_< \fBis_scalar\fP< _Tp >, \fBis_same\fP< _Tp, \fBdecay_t\fP< _Up > > > >, \fBis_assignable\fP< _Tp &, _Up > >::value, \fBoptional\fP & > \fBoperator=\fP (_Up &&\fB__u\fP)" .br .ti -1c .RI "template<\fBtypename\fP _Up > \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, const _Up & >, \fBis_assignable\fP< _Tp &, _Up >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > >, __not_< \fB__assigns_from_optional\fP< _Tp, _Up > > >::value, \fBoptional\fP & > \fBoperator=\fP (const \fBoptional\fP< _Up > &\fB__u\fP)" .br .ti -1c .RI "\fBoptional\fP & \fBoperator=\fP (\fBnullopt_t\fP) noexcept" .br .ti -1c .RI "template<\fBtypename\fP _Up > \fBenable_if_t\fP< __and_< __not_< \fBis_same\fP< _Tp, _Up > >, \fBis_constructible\fP< _Tp, _Up >, \fBis_assignable\fP< _Tp &, _Up >, __not_< \fB__converts_from_optional\fP< _Tp, _Up > >, __not_< \fB__assigns_from_optional\fP< _Tp, _Up > > >::value, \fBoptional\fP & > \fBoperator=\fP (\fBoptional\fP< _Up > &&\fB__u\fP)" .br .ti -1c .RI "\fBvoid\fP \fBswap\fP (\fBoptional\fP &__other) noexcept(\fBis_nothrow_move_constructible\fP< _Tp >() &&\fB__is_nothrow_swappable\fP< _Tp >::value)" .br .ti -1c .RI "constexpr _Tp & \fBvalue\fP () &" .br .ti -1c .RI "constexpr _Tp && \fBvalue\fP () &&" .br .ti -1c .RI "constexpr const _Tp & \fBvalue\fP () const &" .br .ti -1c .RI "constexpr const _Tp && \fBvalue\fP () const &&" .br .ti -1c .RI "template<\fBtypename\fP _Up > _Tp \fBvalue_or\fP (_Up &&\fB__u\fP) &&" .br .ti -1c .RI "template<\fBtypename\fP _Up > constexpr _Tp \fBvalue_or\fP (_Up &&\fB__u\fP) const &" .br .in -1c .SH "Detailed Description" .PP .SS "template<\fBtypename\fP _Tp> .br class std::experimental::optional< _Tp >"Class template for optional values\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.