pstore2
Public Types | Public Member Functions | Friends | List of all members
pstore::error_or< T > Class Template Reference

Public Types

using value_type = T
 
using reference = T &
 
using const_reference = typename std::remove_reference< T >::type const &
 
using pointer = gsl::not_null< typename std::remove_reference< T >::type * >
 
using const_pointer = gsl::not_null< typename std::remove_reference< T >::type const * >
 

Public Member Functions

template<typename ErrorCode , typename = typename std::enable_if<is_error<ErrorCode>::value>::type>
 error_or (ErrorCode const erc)
 
 error_or (std::error_code const erc)
 
template<typename Other , typename = typename std::enable_if<std::is_convertible<Other, T>::value>::type>
 error_or (Other &&other)
 
template<typename... Args>
 error_or (in_place_t const inp, Args &&... args)
 
 error_or (error_or const &rhs)
 
template<typename Other , typename = typename std::enable_if<std::is_convertible<Other, T>::value>::type>
 error_or (error_or< Other > const &rhs)
 
 error_or (error_or &&rhs) noexcept
 
template<typename Other , typename = typename std::enable_if<std::is_convertible<Other, T>::value>::type>
 error_or (error_or< Other > &&rhs) noexcept
 
template<typename ErrorCode , typename = typename std::enable_if<is_error<ErrorCode>::value>::type>
error_oroperator= (ErrorCode rhs)
 
error_oroperator= (std::error_code const &rhs)
 
error_oroperator= (error_or const &rhs)
 
error_oroperator= (error_or &&rhs)
 
bool operator== (std::error_code const rhs) const
 
bool operator== (error_or const &rhs)
 
bool operator== (T const &rhs) const
 
template<typename Error >
std::enable_if< is_error< Error >::value, bool >::type operator== (Error rhs) const
 
bool operator!= (T const &rhs) const
 
bool operator!= (std::error_code const rhs) const
 
bool operator!= (error_or const &rhs)
 
template<typename Error >
std::enable_if< is_error< Error >::value, bool >::type operator!= (Error rhs) const
 
 operator bool () const noexcept
 Return true if a value is held, otherwise false.
 
std::error_code get_error () const noexcept
 
reference get () noexcept
 
const_reference get () const noexcept
 
pointer operator-> () noexcept
 
const_pointer operator-> () const noexcept
 
reference operator* () noexcept
 
const_reference operator* () const noexcept
 
template<typename Other >
auto copy_assign (error_or< Other > const &rhs) -> error_or &
 
template<typename Other >
auto move_assign (error_or< Other > &&rhs) -> error_or &
 

Friends

template<typename Other >
class error_or
 

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