OptScalarStorage< T > Class Template Reference

#include <optional.h>

Public Member Functions

 OptScalarStorage ()
 
 OptScalarStorage (NO_VALUE_TYPE)
 
OptScalarStorageoperator= (NO_VALUE_TYPE)
 
 OptScalarStorage (const OptScalarStorage &)=default
 
OptScalarStorageoperator= (const OptScalarStorage &)=default
 
template<typename U >
 OptScalarStorage (U value)
 
template<typename U >
OptScalarStorageoperator= (U value)
 
template<typename U >
 OptScalarStorage (IN_PLACE_TYPE, U value)
 
template<typename U >
void Emplace (U value)
 
Result< void > CopyFrom (const OptScalarStorage &src)
 
T & GetValueRef ()
 
const T & GetValueRef () const
 
Bool HasValue () const
 

Private Attributes

Bool _hasValue
 
_valueStorage
 

Constructor & Destructor Documentation

◆ OptScalarStorage() [1/5]

◆ OptScalarStorage() [2/5]

◆ OptScalarStorage() [3/5]

OptScalarStorage ( const OptScalarStorage< T > &  )
default

◆ OptScalarStorage() [4/5]

OptScalarStorage ( value)
explicit

◆ OptScalarStorage() [5/5]

OptScalarStorage ( IN_PLACE_TYPE  ,
value 
)
explicit

Member Function Documentation

◆ operator=() [1/3]

OptScalarStorage& operator= ( NO_VALUE_TYPE  )

◆ operator=() [2/3]

OptScalarStorage& operator= ( const OptScalarStorage< T > &  )
default

◆ operator=() [3/3]

OptScalarStorage& operator= ( value)

◆ Emplace()

void Emplace ( value)

◆ CopyFrom()

Result<void> CopyFrom ( const OptScalarStorage< T > &  src)

◆ GetValueRef() [1/2]

T& GetValueRef ( )

◆ GetValueRef() [2/2]

const T& GetValueRef ( ) const

◆ HasValue()

Bool HasValue ( ) const

Member Data Documentation

◆ _hasValue

Bool _hasValue
private

◆ _valueStorage

T _valueStorage
private