Agora  1.2.0
Agora project
Catch::Option< T > Class Template Reference

#include <catch.hpp>

Public Member Functions

 Option ()
 
 Option (T const &_value)
 
 Option (Option const &_other)
 
 ~Option ()
 
Optionoperator= (Option const &_other)
 
Optionoperator= (T const &_value)
 
void reset ()
 
Toperator* ()
 
T const & operator* () const
 
Toperator-> ()
 
const Toperator-> () const
 
T valueOr (T const &defaultValue) const
 
bool some () const
 
bool none () const
 
bool operator! () const
 
 operator bool () const
 

Private Attributes

TnullableValue
 
char storage [sizeof(T)]
 

Constructor & Destructor Documentation

◆ Option() [1/3]

template<typename T >
Catch::Option< T >::Option ( )
inline

◆ Option() [2/3]

template<typename T >
Catch::Option< T >::Option ( T const &  _value)
inline

◆ Option() [3/3]

template<typename T >
Catch::Option< T >::Option ( Option< T > const &  _other)
inline

◆ ~Option()

template<typename T >
Catch::Option< T >::~Option ( )
inline

Member Function Documentation

◆ none()

template<typename T >
bool Catch::Option< T >::none ( ) const
inline

◆ operator bool()

template<typename T >
Catch::Option< T >::operator bool ( ) const
inlineexplicit

◆ operator!()

template<typename T >
bool Catch::Option< T >::operator! ( ) const
inline

◆ operator*() [1/2]

template<typename T >
T& Catch::Option< T >::operator* ( )
inline

◆ operator*() [2/2]

template<typename T >
T const& Catch::Option< T >::operator* ( ) const
inline

◆ operator->() [1/2]

template<typename T >
T* Catch::Option< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<typename T >
const T* Catch::Option< T >::operator-> ( ) const
inline

◆ operator=() [1/2]

template<typename T >
Option& Catch::Option< T >::operator= ( Option< T > const &  _other)
inline

◆ operator=() [2/2]

template<typename T >
Option& Catch::Option< T >::operator= ( T const &  _value)
inline

◆ reset()

template<typename T >
void Catch::Option< T >::reset ( )
inline

◆ some()

template<typename T >
bool Catch::Option< T >::some ( ) const
inline

◆ valueOr()

template<typename T >
T Catch::Option< T >::valueOr ( T const &  defaultValue) const
inline

Member Data Documentation

◆ nullableValue

template<typename T >
T* Catch::Option< T >::nullableValue
private

◆ storage

template<typename T >
char Catch::Option< T >::storage[sizeof(T)]
private

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