Apache Mesos
Public Member Functions | Static Public Member Functions | List of all members
Option< T > Class Template Reference

#include <option.hpp>

Public Member Functions

 Option ()
 
 Option (const T &_t)
 
 Option (T &&_t)
 
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
 Option (const U &u)
 
 Option (const None &)
 
template<typename U >
 Option (const _Some< U > &some)
 
template<typename U >
 Option (_Some< U > &&some)
 
 Option (const Option< T > &that)
 
 Option (Option< T > &&that) noexcept(std::is_nothrow_move_constructible< T >::value)
 
 ~Option ()
 
Option< T > & operator= (const Option< T > &that)
 
Option< T > & operator= (Option< T > &&that) noexcept(std::is_nothrow_move_constructible< T >::value)
 
bool isSome () const
 
bool isNone () const
 
const T & get () const &
 
T & get ()&
 
T && get ()&&
 
const T && get () const &&
 
const T * operator-> () const
 
T * operator-> ()
 
template<typename U >
getOrElse (U &&u) const &
 
template<typename U >
getOrElse (U &&u)&&
 
bool operator== (const Option< T > &that) const
 
bool operator!= (const Option< T > &that) const
 
bool operator== (const T &that) const
 
bool operator!= (const T &that) const
 

Static Public Member Functions

static Option< T > none ()
 
static Option< T > some (const T &t)
 

Constructor & Destructor Documentation

template<typename T>
Option< T >::Option ( )
inline
template<typename T>
Option< T >::Option ( const T &  _t)
inline
template<typename T>
Option< T >::Option ( T &&  _t)
inline
template<typename T>
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
Option< T >::Option ( const U &  u)
inline
template<typename T>
Option< T >::Option ( const None )
inline
template<typename T>
template<typename U >
Option< T >::Option ( const _Some< U > &  some)
inline
template<typename T>
template<typename U >
Option< T >::Option ( _Some< U > &&  some)
inline
template<typename T>
Option< T >::Option ( const Option< T > &  that)
inline
template<typename T>
Option< T >::Option ( Option< T > &&  that)
inlinenoexcept
template<typename T>
Option< T >::~Option ( )
inline

Member Function Documentation

template<typename T>
const T& Option< T >::get ( ) const
inline
template<typename T>
T& Option< T >::get ( )
inline
template<typename T>
T&& Option< T >::get ( )
inline
template<typename T>
const T&& Option< T >::get ( ) const
inline
template<typename T>
template<typename U >
T Option< T >::getOrElse ( U &&  u) const
inline
template<typename T>
template<typename U >
T Option< T >::getOrElse ( U &&  u)
inline
template<typename T>
bool Option< T >::isNone ( ) const
inline
template<typename T>
bool Option< T >::isSome ( ) const
inline
template<typename T>
static Option<T> Option< T >::none ( )
inlinestatic
template<typename T>
bool Option< T >::operator!= ( const Option< T > &  that) const
inline
template<typename T>
bool Option< T >::operator!= ( const T &  that) const
inline
template<typename T>
const T* Option< T >::operator-> ( ) const
inline
template<typename T>
T* Option< T >::operator-> ( )
inline
template<typename T>
Option<T>& Option< T >::operator= ( const Option< T > &  that)
inline
template<typename T>
Option<T>& Option< T >::operator= ( Option< T > &&  that)
inlinenoexcept
template<typename T>
bool Option< T >::operator== ( const Option< T > &  that) const
inline
template<typename T>
bool Option< T >::operator== ( const T &  that) const
inline
template<typename T>
static Option<T> Option< T >::some ( const T &  t)
inlinestatic

Member Data Documentation

template<typename T>
std::remove_const<T>::type Option< T >::t

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