BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Public Types | Public Member Functions | Friends | List of all members
fc::optional< T > Class Template Reference

provides stack-based nullable value similar to boost::optional More...

#include <optional.hpp>

Public Types

typedef T value_type
 

Public Member Functions

 optional ()
 
 ~optional ()
 
 optional (optional &o)
 
 optional (const optional &o)
 
 optional (optional &&o)
 
template<typename U >
 optional (const optional< U > &o)
 
template<typename U >
 optional (optional< U > &o)
 
template<typename U >
 optional (optional< U > &&o)
 
template<typename U >
 optional (U &&u)
 
template<typename U >
optionaloperator= (U &&u)
 
template<typename U >
optionaloperator= (optional< U > &o)
 
template<typename U >
optionaloperator= (const optional< U > &o)
 
optionaloperator= (optional &o)
 
optionaloperator= (const optional &o)
 
template<typename U >
optionaloperator= (optional< U > &&o)
 
optionaloperator= (optional &&o)
 
bool valid () const
 
bool operator! () const
 
 operator bool () const
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
optionaloperator= (std::nullptr_t)
 
void reset ()
 

Friends

template<typename U >
class optional
 
bool operator< (const optional a, optional b)
 
bool operator== (const optional a, optional b)
 

Detailed Description

template<typename T>
class fc::optional< T >

provides stack-based nullable value similar to boost::optional

Simply including boost::optional adds 35,000 lines to each object file, using fc::optional adds less than 400.

Definition at line 20 of file optional.hpp.

Member Typedef Documentation

◆ value_type

template<typename T >
typedef T fc::optional< T >::value_type

Definition at line 23 of file optional.hpp.

Constructor & Destructor Documentation

◆ optional() [1/8]

template<typename T >
fc::optional< T >::optional ( )
inline

Definition at line 25 of file optional.hpp.

◆ ~optional()

template<typename T >
fc::optional< T >::~optional ( )
inline

Definition at line 26 of file optional.hpp.

◆ optional() [2/8]

template<typename T >
fc::optional< T >::optional ( optional< T > &  o)
inline

Definition at line 28 of file optional.hpp.

◆ optional() [3/8]

template<typename T >
fc::optional< T >::optional ( const optional< T > &  o)
inline

Definition at line 35 of file optional.hpp.

◆ optional() [4/8]

template<typename T >
fc::optional< T >::optional ( optional< T > &&  o)
inline

Definition at line 42 of file optional.hpp.

◆ optional() [5/8]

template<typename T >
template<typename U >
fc::optional< T >::optional ( const optional< U > &  o)
inline

Definition at line 51 of file optional.hpp.

◆ optional() [6/8]

template<typename T >
template<typename U >
fc::optional< T >::optional ( optional< U > &  o)
inline

Definition at line 59 of file optional.hpp.

◆ optional() [7/8]

template<typename T >
template<typename U >
fc::optional< T >::optional ( optional< U > &&  o)
inline

Definition at line 70 of file optional.hpp.

◆ optional() [8/8]

template<typename T >
template<typename U >
fc::optional< T >::optional ( U &&  u)
inline

Definition at line 79 of file optional.hpp.

Member Function Documentation

◆ operator bool()

template<typename T >
fc::optional< T >::operator bool ( ) const
inlineexplicit

Definition at line 191 of file optional.hpp.

◆ operator!()

template<typename T >
bool fc::optional< T >::operator! ( ) const
inline

Definition at line 187 of file optional.hpp.

◆ operator*() [1/2]

template<typename T >
T& fc::optional< T >::operator* ( )
inline

Definition at line 193 of file optional.hpp.

◆ operator*() [2/2]

template<typename T >
const T& fc::optional< T >::operator* ( ) const
inline

Definition at line 194 of file optional.hpp.

◆ operator->() [1/2]

template<typename T >
T* fc::optional< T >::operator-> ( )
inline

Definition at line 196 of file optional.hpp.

◆ operator->() [2/2]

template<typename T >
const T* fc::optional< T >::operator-> ( ) const
inline

Definition at line 201 of file optional.hpp.

◆ operator=() [1/8]

template<typename T >
optional& fc::optional< T >::operator= ( const optional< T > &  o)
inline

Definition at line 137 of file optional.hpp.

◆ operator=() [2/8]

template<typename T >
template<typename U >
optional& fc::optional< T >::operator= ( const optional< U > &  o)
inline

Definition at line 109 of file optional.hpp.

◆ operator=() [3/8]

template<typename T >
optional& fc::optional< T >::operator= ( optional< T > &&  o)
inline

Definition at line 169 of file optional.hpp.

◆ operator=() [4/8]

template<typename T >
optional& fc::optional< T >::operator= ( optional< T > &  o)
inline

Definition at line 123 of file optional.hpp.

◆ operator=() [5/8]

template<typename T >
template<typename U >
optional& fc::optional< T >::operator= ( optional< U > &&  o)
inline

Definition at line 152 of file optional.hpp.

◆ operator=() [6/8]

template<typename T >
template<typename U >
optional& fc::optional< T >::operator= ( optional< U > &  o)
inline

Definition at line 95 of file optional.hpp.

◆ operator=() [7/8]

template<typename T >
optional& fc::optional< T >::operator= ( std::nullptr_t  )
inline

Definition at line 207 of file optional.hpp.

◆ operator=() [8/8]

template<typename T >
template<typename U >
optional& fc::optional< T >::operator= ( U &&  u)
inline

Definition at line 86 of file optional.hpp.

◆ reset()

template<typename T >
void fc::optional< T >::reset ( )
inline

Definition at line 224 of file optional.hpp.

◆ valid()

template<typename T >
bool fc::optional< T >::valid ( ) const
inline

Definition at line 186 of file optional.hpp.

Friends And Related Function Documentation

◆ operator<

template<typename T >
bool operator< ( const optional< T >  a,
optional< T >  b 
)
friend

Definition at line 213 of file optional.hpp.

◆ operator==

template<typename T >
bool operator== ( const optional< T >  a,
optional< T >  b 
)
friend

Definition at line 218 of file optional.hpp.

◆ optional

template<typename T >
template<typename U >
friend class optional
friend

Definition at line 233 of file optional.hpp.


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