scnlib  0.1.2
FormattedinputformodernC++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
scn::result< T, Error > Class Template Reference

#include <result.h>

Inheritance diagram for scn::result< T, Error >:
scn::ranges::ranges_result< Iterator, Sentinel >

Public Types

using success_type = T
 
using error_type = Error
 

Public Member Functions

SCN_CONSTEXPR result (success_type val)
 
SCN_CONSTEXPR result (success_type val, error_type err)
 
SCN_CONSTEXPR14 success_typevalue ()&noexcept
 
SCN_CONSTEXPR const success_typevalue () const &noexcept
 
SCN_CONSTEXPR14 success_type value ()&&noexcept
 
SCN_CONSTEXPR14 error_typeerror ()&noexcept
 
SCN_CONSTEXPR const error_typeerror () const &noexcept
 
SCN_CONSTEXPR14 error_type error ()&&noexcept
 
SCN_CONSTEXPR operator bool () const noexcept
 
SCN_CONSTEXPR bool has_error () const noexcept
 

Detailed Description

template<typename T, typename Error = ::scn::error>
class scn::result< T, Error >

Definition at line 127 of file result.h.

Member Typedef Documentation

template<typename T , typename Error = ::scn::error>
using scn::result< T, Error >::error_type = Error

Definition at line 130 of file result.h.

template<typename T , typename Error = ::scn::error>
using scn::result< T, Error >::success_type = T

Definition at line 129 of file result.h.

Constructor & Destructor Documentation

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR scn::result< T, Error >::result ( success_type  val)
inline

Definition at line 132 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR scn::result< T, Error >::result ( success_type  val,
error_type  err 
)
inline

Definition at line 133 of file result.h.

Member Function Documentation

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR14 error_type& scn::result< T, Error >::error ( )
inlinenoexcept

Definition at line 151 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR const error_type& scn::result< T, Error >::error ( ) const
inlinenoexcept

Definition at line 155 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR14 error_type scn::result< T, Error >::error ( )
inlinenoexcept

Definition at line 159 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR bool scn::result< T, Error >::has_error ( ) const
inlinenoexcept

Definition at line 168 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR scn::result< T, Error >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 164 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR14 success_type& scn::result< T, Error >::value ( )
inlinenoexcept

Definition at line 138 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR const success_type& scn::result< T, Error >::value ( ) const
inlinenoexcept

Definition at line 142 of file result.h.

template<typename T , typename Error = ::scn::error>
SCN_CONSTEXPR14 success_type scn::result< T, Error >::value ( )
inlinenoexcept

Definition at line 146 of file result.h.


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