by::tres< T, R > Class Template Reference

Template result container with error handling capabilities. More...

#include <tres.hpp>

Inheritance diagram for by::tres< T, R >:
by::tmay< T >

Public Member Functions

 tres (const T &value)
 
 tres (const R &value)
 
R & getErr ()
 
const R & getErr () const BY_CONST_FUNC(getErr()) void rel() override
 
void set (const T &arg) override
 
void setErr (const R &arg)
 
- Public Member Functions inherited from by::tmay< T >
 tmay (const T &value)
 
 tmay (const tmedium< T > &value)
 
T * operator-> ()
 
const T * operator-> () const BY_CONST_FUNC(operator->())
 
T & operator* ()
 
const T & operator* () const BY_CONST_FUNC(operator*())
 
 operator T& ()
 
 operator const T & () const
 
 operator nbool () const
 
nbool has () const
 
T * get ()
 
const T * get () const BY_CONST_FUNC(get()) virtual void rel()
 

Detailed Description

template<typename T, typename R>
class by::tres< T, R >

Template result container with error handling capabilities.

Extends tmay<T> to include error information of type R. Provides dual-state container that can hold either a successful value or an error state, making it useful for robust error handling patterns.

Member Function Documentation

◆ set()

template<typename T , typename R >
void by::tres< T, R >::set ( const T &  arg)
overridevirtual

Reimplemented from by::tmay< T >.


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