libopenraw
Option< T > Class Template Reference

Public Types

typedef T value_type

Public Member Functions

 Option (T &&data)
 Option (const T &data)
template<class... Args>
 Option (Args &&... args)
T && value ()
T && value_or (T &&def)
bool empty () const
constexpr operator bool () const
constexpr bool has_value () const

Detailed Description

template<class T>
class Option< T >

Definition at line 29 of file option.hpp.

Member Typedef Documentation

◆ value_type

template<class T>
typedef T Option< T >::value_type

Definition at line 32 of file option.hpp.

Constructor & Destructor Documentation

◆ Option() [1/4]

template<class T>
Option< T >::Option ( )
inline

Definition at line 34 of file option.hpp.

◆ Option() [2/4]

template<class T>
Option< T >::Option ( T && data)
inlineexplicit

Definition at line 39 of file option.hpp.

◆ Option() [3/4]

template<class T>
Option< T >::Option ( const T & data)
inlineexplicit

Definition at line 44 of file option.hpp.

◆ Option() [4/4]

template<class T>
template<class... Args>
Option< T >::Option ( Args &&... args)
inline

Definition at line 50 of file option.hpp.

Member Function Documentation

◆ empty()

template<class T>
bool Option< T >::empty ( ) const
inline

Definition at line 73 of file option.hpp.

◆ has_value()

template<class T>
bool Option< T >::has_value ( ) const
inlineconstexpr

Definition at line 78 of file option.hpp.

◆ operator bool()

template<class T>
Option< T >::operator bool ( ) const
inlineexplicitconstexpr

Definition at line 76 of file option.hpp.

◆ value()

template<class T>
T && Option< T >::value ( )
inline

Definition at line 56 of file option.hpp.

◆ value_or()

template<class T>
T && Option< T >::value_or ( T && def)
inline

Definition at line 64 of file option.hpp.


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