Simple Lua
A Simple C++ Lua Wrapper
Loading...
Searching...
No Matches
SL::Util::Result< T, E > Struct Template Reference

Basic way to return a value or an error. More...

#include <Result.hpp>

Public Member Functions

 Result (const Result &)=delete
 
 Result (Result &&)=delete
 
 Result (T &&val)
 
 Result (const E &err)
 
T & value ()
 
const T & value () const
 
const E & error () const
 
bool good () const
 
 operator bool () const
 
constexpr T * operator-> ()
 
constexpr const T * operator-> () const
 
constexpr T & operator* ()
 
constexpr const T & operator* () const
 

Detailed Description

template<typename T, typename E = Error<>>
struct SL::Util::Result< T, E >

Basic way to return a value or an error.

Template Parameters
TThe return type of the result
EThe type of error to be handled

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