Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::Result< void, E > Class Template Reference

#include <Result.h>

Public Types

using ResultType = void
 
using ErrorType = E
 

Public Member Functions

 operator bool () const noexcept
 Whether it is an error.
 
bool has_error () const noexcept
 Whether it is an error.
 
E & err () noexcept
 Get the error.
 
err () const noexcept
 Get the error.
 

Static Public Member Functions

static Result error (E error) noexcept
 
static Result success () noexcept
 

Private Member Functions

 Result ()=default
 

Private Attributes

std::optional< E > e
 

Member Typedef Documentation

◆ ErrorType

template<class E >
using sese::Result< void, E >::ErrorType = E

◆ ResultType

template<class E >
using sese::Result< void, E >::ResultType = void

Constructor & Destructor Documentation

◆ Result()

template<class E >
sese::Result< void, E >::Result ( )
privatedefault

Member Function Documentation

◆ err() [1/2]

template<class E >
E sese::Result< void, E >::err ( ) const
inlinenoexcept

Get the error.

Returns
The error

References e.

◆ err() [2/2]

template<class E >
E & sese::Result< void, E >::err ( )
inlinenodiscardnoexcept

Get the error.

Returns
The error

References e.

◆ error()

template<class E >
static Result sese::Result< void, E >::error ( E error)
inlinestaticnoexcept

◆ has_error()

template<class E >
bool sese::Result< void, E >::has_error ( ) const
inlinenoexcept

Whether it is an error.

Return values
turehas error

References e.

◆ operator bool()

template<class E >
sese::Result< void, E >::operator bool ( ) const
inlineexplicitnoexcept

Whether it is an error.

Return values
turehas error

References e.

◆ success()

template<class E >
static Result sese::Result< void, E >::success ( )
inlinestaticnoexcept

Member Data Documentation

◆ e

template<class E >
std::optional<E> sese::Result< void, E >::e
private

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