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

#include "lib/result.hpp"

Description

template<typename RES>
class lib::Result< RES >

Representation of the result of some operation, EITHER a value or a failure.

Optional Result value or status of some operation.

It can be created for passing a result produced by the operation, or the failure to do so. The value can be retrieved by implicit or explicit conversion.

Exceptions
error::Stateon any attempt to access the value in case of failure
Warning
this class has a lot of implicit conversions; care should be taken when defining functions to take Result instances as parameter....

Definition at line 97 of file result.hpp.

Public Member Functions

 Result (lumiera::Error const &reason)
 mark failed result, with reason given. More...
 

Private Attributes

wrapper::ItemWrapper< RES > value_
 

Constructor & Destructor Documentation

◆ Result()

Result ( lumiera::Error const &  reason)
inline

mark failed result, with reason given.

Definition at line 161 of file result.hpp.

Referenced by Result< void >::Result(), and Result< TAR &>::Result().

+ Here is the caller graph for this function:
+ Inheritance diagram for Result< RES >:
+ Collaboration diagram for Result< RES >:

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