跳转至

File details/result.h

FileList > details > result.h

Go to the source code of this file

  • #include <functional>
  • #include <iostream>
  • #include <type_traits>

Namespaces

Type Name
namespace concepts
namespace details
namespace And
namespace impl
namespace Or
namespace impl
namespace Other
namespace impl
namespace err
namespace impl
namespace impl
namespace ok
namespace impl
namespace types

Classes

Type Name
struct Result <typename T, typename E>
struct EqualityComparable <typename T, typename>
struct EqualityComparable< T, typename std::enable_if< true, typename details::void_t< decltype(std::declval< T >()==std::declval< T >())>::type >::type > <typename T>
struct Then <typename Func>
struct Then< Ret(*)(Args...)> <typename Ret, Args>
struct Then< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Then< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Then< Ret(*)(Args...)> <typename Ret, Args>
struct Then< Ret(Arg)> <typename Ret, typename Arg>
struct Then< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Then< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Then< Ret(void)> <typename Ret>
struct Constructor <typename T, typename E>
struct Constructor< void, E > <typename E>
struct IsResult <typename R>
struct IsResult< Result< T, E > > <typename T, typename E>
struct Else <typename Func>
struct Else< Ret(*)(Args...)> <typename Ret, Args>
struct Else< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Else< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Else< Result< T, F >(Arg)> <typename T, typename F, typename Arg>
struct Else< Result< T, F >(void)> <typename T, typename F>
struct Else< Ret(*)(Args...)> <typename Ret, Args>
struct Else< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Else< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Wise <typename Func>
struct Wise< Ret(*)(Args...)> <typename Ret, Args>
struct Wise< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Wise< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Wise< Ret(*)(Args...)> <typename Ret, Args>
struct Wise< Ret(Arg)> <typename Ret, typename Arg>
struct Wise< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Wise< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct ResultErrType <typename R>
struct ResultErrType< Result< T, E > > <typename T, typename E>
struct ResultOkType <typename R>
struct ResultOkType< Result< T, E > > <typename T, typename E>
struct Storage <typename T, typename E>
struct Storage< void, E > <typename E>
struct Map <typename Func>
struct Map< Ret(Cls::*)(Arg) const > <typename Ret, typename Cls, typename Arg>
struct err_tag
struct result_of< Ret(Args...)> <typename Ret, Args>
struct result_of< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Map <typename Func>
struct Map< Ret(*)(Args...)> <typename Ret, Args>
struct Map< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct Map< Ret(Cls::*)(Args...)> <typename Ret, typename Cls, Args>
struct Map< std::function< Ret(Args...)> > <typename Ret, Args>
struct Map< Result< U, E >(Arg)> <typename U, typename E, typename Arg>
struct Map< Result< U, E >(void)> <typename U, typename E>
struct Map< Ret(Arg)> <typename Ret, typename Arg>
struct Map< Ret(Cls::*)(Arg) const > <typename Ret, typename Cls, typename Arg>
struct Map< Ret(Cls::*)(Arg)> <typename Ret, typename Cls, typename Arg>
struct Map< Ret(void)> <typename Ret>
struct Map< void(Arg)> <typename Arg>
struct Map< void(void)> <>
struct ok_tag
struct result_of <typename Func>
struct result_of< Ret(*)(Args...)> <typename Ret, Args>
struct result_of< Ret(Cls::*)(Args...) const > <typename Ret, typename Cls, Args>
struct void_t <typename...>
struct Err <typename E>
struct Ok <typename T>
struct Ok< void > <>

Public Functions

Type Name
types::Err< CleanE > Err (E && val)
types::Ok< CleanT > Ok (T && val)
types::Ok< void > Ok ()
bool operator== (const Result< T, E > & lhs, const Result< T, E > & rhs)
bool operator== (const Result< T, E > & lhs, types::Ok< T > ok)
bool operator== (const Result< void, E > & lhs, types::Ok< void >)
bool operator== (const Result< T, E > & lhs, types::Err< E > err)

Macros

Type Name
define TRY (...) /* multi line expression */

Public Functions Documentation

function Err

template<typename E, typename CleanE>
types::Err < CleanE > Err (
    E && val
) 

function Ok

template<typename T, typename CleanT>
types::Ok < CleanT > Ok (
    T && val
) 

function Ok

inline types::Ok < void > Ok () 

function operator==

template<typename T, typename E>
bool operator== (
    const Result < T, E > & lhs,
    const Result < T, E > & rhs
) 

function operator==

template<typename T, typename E>
bool operator== (
    const Result < T, E > & lhs,
    types::Ok < T > ok
) 

function operator==

template<typename E>
bool operator== (
    const Result < void, E > & lhs,
    types::Ok < void >
) 

function operator==

template<typename T, typename E>
bool operator== (
    const Result < T, E > & lhs,
    types::Err < E > err
) 

Macro Definition Documentation

define TRY

#define TRY (
    ...
) `/* multi line expression */`


The documentation for this class was generated from the following file include/qqmusic/details/result.h