cppx-core
Classes | Functions
cppx::hf Namespace Reference

Classes

struct  Failure
 
struct  Success
 

Functions

 CPPX_USE_STD (current_exception, runtime_error, string, throw_with_nested)
 
auto hopefully (const Truth condition) -> Truth
 
template<class X = runtime_error>
auto fail (const string &message) -> Truth
 
template<class X = runtime_error>
auto fail (const string &message, const Abstract_source_location &throw_point) -> Truth
 
template<class Value >
auto operator>> (const Value &v, Failure) -> Truth
 

Function Documentation

◆ CPPX_USE_STD()

cppx::hf::CPPX_USE_STD ( current_exception  ,
runtime_error  ,
string  ,
throw_with_nested   
)

◆ fail() [1/2]

template<class X = runtime_error>
auto cppx::hf::fail ( const string &  message) -> Truth
inline

Definition at line 50 of file hopefully_and_fail.hpp.

◆ fail() [2/2]

template<class X = runtime_error>
auto cppx::hf::fail ( const string &  message,
const Abstract_source_location throw_point 
) -> Truth
inline

Definition at line 69 of file hopefully_and_fail.hpp.

◆ hopefully()

auto cppx::hf::hopefully ( const Truth  condition) -> Truth
inline

Definition at line 44 of file hopefully_and_fail.hpp.

◆ operator>>()

template<class Value >
auto cppx::hf::operator>> ( const Value &  v,
Failure   
) -> Truth

Definition at line 100 of file hopefully_and_fail.hpp.