STD::EXPERIMENTAL::_OPTIONAL_BASE(3cxx)
β¨ std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor > β 3cxx manual β¨
okay bestie, welcome to the manual page for this absolute C++ icon. She's the class template that holds the necessary state for Optional values and that has the responsibility for construction and the special members. π
π NAME π
std::experimental::_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. She's the backstage queen of optional, no cap. π
πΈ SYNOPSIS πΈ
#include <optional>
Inherited by std::experimental::optional< _Tp > [private].
π Public Member Functions π
_Optional_base (_Optional_base &&__other) noexcept(is_nothrow_move_constructible< _Tp >())_Optional_base (const _Optional_base &__other)template<typename... _Args> constexpr _Optional_base (in_place_t, _Args &&... __args)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)constexpr _Optional_base (nullopt_t) noexcept_Optional_base & operator= (_Optional_base &&__other) noexcept(__and_< is_nothrow_move_constructible< _Tp >, is_nothrow_move_assignable< _Tp > >())_Optional_base & operator= (const _Optional_base &__other)
πΈ Protected Member Functions πΈ
template<typename... _Args> void _M_construct (_Args &&... __args) noexcept(is_nothrow_constructible< _Stored_type, _Args... >())void _M_destruct ()constexpr const _Tp & _M_get () const noexceptconstexpr _Tp & _M_get () noexceptconstexpr bool _M_is_engaged () const noexceptvoid _M_reset ()
π¦ Detailed Description π¦
template<typename _Tp, bool _ShouldProvideDestructor =
!is_trivially_destructible<_Tp>::value>
class std::experimental::_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. No cap. π§
See also: optional, _Enable_special_members
Definition at line 202 of file optional.
π Constructor & Destructor Documentation π
template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> constexpr std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base () [inline], [constexpr], [noexcept]Definition at line214of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> constexpr std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base (nullopt_t) [inline], [constexpr], [noexcept]Definition at line217of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> template<typename... _Args> constexpr std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base (in_place_t, _Args &&... __args) [inline], [explicit], [constexpr]Definition at line222of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> template<typename _Up , typename... _Args, enable_if_t< is_constructible< _Tp, initializer_list< _Up > &, _Args &&... >::value, int > ...> constexpr std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base (in_place_t, initializer_list< _Up > __il, _Args &&... __args) [inline], [explicit], [constexpr]Definition at line230of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base (const _Optional_base< _Tp, _ShouldProvideDestructor > & __other) [inline]Definition at line237of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_Optional_base (_Optional_base< _Tp, _ShouldProvideDestructor > && __other) [inline], [noexcept]Definition at line243of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::~_Optional_base () [inline]Definition at line285of fileoptional.
π Member Function Documentation π
template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> template<typename... _Args> void std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_construct (_Args &&... __args) [inline], [protected], [noexcept]Definition at line310of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> void std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_destruct () [inline], [protected]Definition at line319of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> constexpr const _Tp & std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_get () const [inline], [constexpr], [protected], [noexcept]Definition at line303of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> constexpr _Tp & std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_get () [inline], [constexpr], [protected], [noexcept]Definition at line299of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> constexpr bool std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_is_engaged () const [inline], [constexpr], [protected], [noexcept]Definition at line294of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> void std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_reset () [inline], [protected]Definition at line327of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> _Optional_base & std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::operator= (_Optional_base< _Tp, _ShouldProvideDestructor > && __other) [inline], [noexcept]Definition at line268of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> _Optional_base & std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::operator= (const _Optional_base< _Tp, _ShouldProvideDestructor > & __other) [inline]Definition at line252of fileoptional.
π Member Data Documentation π
template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> _Empty_byte std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_emptyDefinition at line336of fileoptional.template<typename _Tp , bool _ShouldProvideDestructor = !is_trivially_destructible<_Tp>::value> _Stored_type std::experimental::_Optional_base< _Tp, _ShouldProvideDestructor >::_M_payloadDefinition at line337of fileoptional.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
That's the whole vibe, bestie. This page came from libstdc++ and the manual section is 3cxx; the footer doesn't show a date, so no date to spill. Auto-generated by Doxygen from the source code, and she ate. πβ¨π
π¦ where this page comes from
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2
- ubuntu noble: libstdc++-9-doc 9.5.0-6ubuntu2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms