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

#include <check.hpp>

Public Member Functions

 Try (const T &t)
 
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
 Try (const U &u)
 
 Try (const E &error)
 
 Try (T &&t)
 
template<typename U >
 Try (const _Some< U > &some)
 
template<typename U >
 Try (_Some< U > &&some)
 
 Try (const Try &that)=default
 
 Try (Try &&that)=default
 
 ~Try ()=default
 
Tryoperator= (const Try &that)=default
 
Tryoperator= (Try &&that)=default
 
bool isSome () const
 
bool isError () const
 
T & get ()&
 
const T & get () const &
 
T && get ()&&
 
const T && get () const &&
 
const T * operator-> () const
 
T * operator-> ()
 
const T & operator* () const &
 
T & operator* ()&
 
const T && operator* () const &&
 
T && operator* ()&&
 
const std::conditional< std::is_same< E, Error >::value, std::string, E >::type & error () const
 

Static Public Member Functions

static Try some (const T &t)
 
static Try error (const E &e)
 

Constructor & Destructor Documentation

template<typename T, typename E = Error>
Try< T, E >::Try ( const T &  t)
inline
template<typename T, typename E = Error>
template<typename U , typename = typename std::enable_if< std::is_constructible<T, const U&>::value>::type>
Try< T, E >::Try ( const U &  u)
inline
template<typename T, typename E = Error>
Try< T, E >::Try ( const E &  error)
inline
template<typename T, typename E = Error>
Try< T, E >::Try ( T &&  t)
inline
template<typename T, typename E = Error>
template<typename U >
Try< T, E >::Try ( const _Some< U > &  some)
inline
template<typename T, typename E = Error>
template<typename U >
Try< T, E >::Try ( _Some< U > &&  some)
inline
template<typename T, typename E = Error>
Try< T, E >::Try ( const Try< T, E > &  that)
default
template<typename T, typename E = Error>
Try< T, E >::Try ( Try< T, E > &&  that)
default
template<typename T, typename E = Error>
Try< T, E >::~Try ( )
default

Member Function Documentation

template<typename T, typename E = Error>
static Try Try< T, E >::error ( const E &  e)
inlinestatic
template<typename T, typename E = Error>
const std::conditional< std::is_same<E, Error>::value, std::string, E>::type& Try< T, E >::error ( ) const
inline
template<typename T, typename E = Error>
T& Try< T, E >::get ( )
inline
template<typename T, typename E = Error>
const T& Try< T, E >::get ( ) const
inline
template<typename T, typename E = Error>
T&& Try< T, E >::get ( )
inline
template<typename T, typename E = Error>
const T&& Try< T, E >::get ( ) const
inline
template<typename T, typename E = Error>
bool Try< T, E >::isError ( ) const
inline
template<typename T, typename E = Error>
bool Try< T, E >::isSome ( ) const
inline
template<typename T, typename E = Error>
const T& Try< T, E >::operator* ( ) const
inline
template<typename T, typename E = Error>
T& Try< T, E >::operator* ( )
inline
template<typename T, typename E = Error>
const T&& Try< T, E >::operator* ( ) const
inline
template<typename T, typename E = Error>
T&& Try< T, E >::operator* ( )
inline
template<typename T, typename E = Error>
const T* Try< T, E >::operator-> ( ) const
inline
template<typename T, typename E = Error>
T* Try< T, E >::operator-> ( )
inline
template<typename T, typename E = Error>
Try& Try< T, E >::operator= ( const Try< T, E > &  that)
default
template<typename T, typename E = Error>
Try& Try< T, E >::operator= ( Try< T, E > &&  that)
default
template<typename T, typename E = Error>
static Try Try< T, E >::some ( const T &  t)
inlinestatic

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