STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
_Optional_construct_base< _Ty > Struct Template Reference
Inheritance diagram for _Optional_construct_base< _Ty >:
_Optional_destruct_base< _Ty > _Optional_copymove_base< _Ty, false > _Optional_copymove_base< _Ty, true >

Public Member Functions

template<class... _Types>
void _Construct (_Types &&..._Args)
 
template<class _Ty2 >
void _Assign (_Ty2 &&_Right)
 
void reset () _NOEXCEPT
 

Member Function Documentation

template<class _Ty >
template<class _Ty2 >
void _Optional_construct_base< _Ty >::_Assign ( _Ty2 &&  _Right)
inline
133  { // assign / initialize the contained value from _Right
134  if (this->_Has_value)
135  {
136  this->_Value = _STD forward<_Ty2>(_Right);
137  }
138  else
139  {
140  _Construct(_STD forward<_Ty2>(_Right));
141  }
142  }
void _Construct(_Types &&..._Args)
Definition: optional:124
_In_ _Value
Definition: corecrt_wstdlib.h:65
constexpr const _Ty &() _Right
Definition: algorithm:3723
template<class _Ty >
template<class... _Types>
void _Optional_construct_base< _Ty >::_Construct ( _Types &&...  _Args)
inline
125  { // transition from the empty to the value-containing state
126  // Pre: !this->_Has_value
127  _Construct_in_place(this->_Value, _STD forward<_Types>(_Args)...);
128  this->_Has_value = true;
129  }
void _Construct_in_place(_Ty &_Obj, _Types &&..._Args)
Definition: xmemory0:146
_In_ _Value
Definition: corecrt_wstdlib.h:65
template<class _Ty >
void _Optional_construct_base< _Ty >::reset ( )
inline
145  { // destroy any contained value and transition to the empty state
146  if (this->_Has_value)
147  {
148  _Destroy_in_place(this->_Value);
149  this->_Has_value = false;
150  }
151  }
_In_ _Value
Definition: corecrt_wstdlib.h:65
void _Destroy_in_place(_Ty &_Obj) _NOEXCEPT
Definition: xmemory0:296

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