Lumiera  0.pre.03
»edit your freedom«
Result< void > Class Template Reference

#include "lib/result.hpp"

Description

template<>
class lib::Result< void >

The base case is just to capture success or failure, without returning any value result.

Definition at line 114 of file result.hpp.

Public Member Functions

 Result (bool success=false)
 mark either failure (default) or success
 
 Result (lumiera::Error const &reason)
 failed result, with reason given. More...
 
template<class FUN , typename... ARGS, typename = lib::meta::enable_if<std::is_invocable<FUN,ARGS...>>>
 Result (FUN &&callable, ARGS &&...args) noexcept
 invoke a callable and mark success or failure
 
bool isValid () const
 
void maybeThrow () const
 
 operator bool () const
 

Protected Attributes

std::exception_ptr failure_
 

Constructor & Destructor Documentation

◆ Result()

Result ( lumiera::Error const &  reason)
inline

failed result, with reason given.

Definition at line 126 of file result.hpp.

+ Collaboration diagram for Result< void >:

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