idol
A C++ Framework for Optimization
Loading...
Searching...
No Matches
idol::Optional< T > Class Template Reference
Collaboration diagram for idol::Optional< T >:
Collaboration graph

Public Member Functions

 Optional (const Optional< T > &t_optional)
 
 Optional (Optional< T > &&t_optional) noexcept
 
 Optional (const T &t_value)
 
 Optional (T &&t_value)
 
bool has_value () const
 
T & value ()
 
const T & value () const
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
 operator bool () const
 
Optional< T > & operator= (T &&t_value)
 
Optional< T > & operator= (const T &t_value)
 
void reset ()
 
template<class ... ArgsT>
T & emplace (ArgsT &&...t_args)
 

Detailed Description

template<class T>
class idol::Optional< T >

Definition at line 13 of file Optional.h.

Constructor & Destructor Documentation

◆ Optional() [1/4]

template<class T >
idol::Optional< T >::Optional ( const Optional< T > &  t_optional)
inline

Definition at line 18 of file Optional.h.

◆ Optional() [2/4]

template<class T >
idol::Optional< T >::Optional ( Optional< T > &&  t_optional)
inlinenoexcept

Definition at line 20 of file Optional.h.

◆ Optional() [3/4]

template<class T >
idol::Optional< T >::Optional ( const T &  t_value)
inline

Definition at line 24 of file Optional.h.

◆ Optional() [4/4]

template<class T >
idol::Optional< T >::Optional ( T &&  t_value)
inline

Definition at line 26 of file Optional.h.

◆ ~Optional()

template<class T >
idol::Optional< T >::~Optional ( )
inline

Definition at line 28 of file Optional.h.

Member Function Documentation

◆ emplace()

template<class T >
template<class ... ArgsT>
T & idol::Optional< T >::emplace ( ArgsT &&...  t_args)
inline

Definition at line 84 of file Optional.h.

◆ has_value()

template<class T >
bool idol::Optional< T >::has_value ( ) const
inline

Definition at line 34 of file Optional.h.

◆ operator bool()

template<class T >
idol::Optional< T >::operator bool ( ) const
inlineexplicit

Definition at line 58 of file Optional.h.

◆ operator*() [1/2]

template<class T >
T & idol::Optional< T >::operator* ( )
inline

Definition at line 50 of file Optional.h.

◆ operator*() [2/2]

template<class T >
const T & idol::Optional< T >::operator* ( ) const
inline

Definition at line 52 of file Optional.h.

◆ operator->() [1/2]

template<class T >
T * idol::Optional< T >::operator-> ( )
inline

Definition at line 54 of file Optional.h.

◆ operator->() [2/2]

template<class T >
const T * idol::Optional< T >::operator-> ( ) const
inline

Definition at line 56 of file Optional.h.

◆ operator=() [1/2]

template<class T >
Optional< T > & idol::Optional< T >::operator= ( const T &  t_value)
inline

Definition at line 68 of file Optional.h.

◆ operator=() [2/2]

template<class T >
Optional< T > & idol::Optional< T >::operator= ( T &&  t_value)
inline

Definition at line 60 of file Optional.h.

◆ reset()

template<class T >
void idol::Optional< T >::reset ( )
inline

Definition at line 76 of file Optional.h.

◆ value() [1/2]

template<class T >
T & idol::Optional< T >::value ( )
inline

Definition at line 36 of file Optional.h.

◆ value() [2/2]

template<class T >
const T & idol::Optional< T >::value ( ) const
inline

Definition at line 43 of file Optional.h.