zpp
Zephyr C++20 Framework
zpp::error_result< T_Error > Class Template Reference

helper class for error result More...

#include <result.hpp>

Public Member Functions

 error_result () noexcept=delete
 
 error_result (error_result &&) noexcept=default
 
 error_result (const error_result &) noexcept=default
 
error_resultoperator= (error_result &&) noexcept=default
 
error_resultoperator= (const error_result &) noexcept=default
 
 error_result (const T_Error &rhs) noexcept
 initialize error_result More...
 
 error_result (T_Error &&rhs) noexcept
 initialize error_result More...
 
T_Error & error () noexcept
 return error value More...
 
const T_Error & error () const noexcept
 return error value More...
 

Detailed Description

template<typename T_Error>
class zpp::error_result< T_Error >

helper class for error result

Definition at line 25 of file result.hpp.

Constructor & Destructor Documentation

◆ error_result() [1/5]

template<typename T_Error >
zpp::error_result< T_Error >::error_result ( )
deletenoexcept

◆ error_result() [2/5]

template<typename T_Error >
zpp::error_result< T_Error >::error_result ( error_result< T_Error > &&  )
defaultnoexcept

◆ error_result() [3/5]

template<typename T_Error >
zpp::error_result< T_Error >::error_result ( const error_result< T_Error > &  )
defaultnoexcept

◆ error_result() [4/5]

template<typename T_Error >
zpp::error_result< T_Error >::error_result ( const T_Error &  rhs)
inlineexplicitnoexcept

initialize error_result

Parameters
rhsthe value the use for initialization

Definition at line 44 of file result.hpp.

45  : m_error(rhs)
46  {
47  }

◆ error_result() [5/5]

template<typename T_Error >
zpp::error_result< T_Error >::error_result ( T_Error &&  rhs)
inlineexplicitnoexcept

initialize error_result

Parameters
rhsthe value the use for initialization

Definition at line 54 of file result.hpp.

55  : m_error(std::move(rhs))
56  {
57  }

Member Function Documentation

◆ error() [1/2]

template<typename T_Error >
const T_Error& zpp::error_result< T_Error >::error ( ) const
inlinenoexcept

return error value

Returns
the error value as a const reference

Definition at line 73 of file result.hpp.

73  {
74  return m_error;
75  }

◆ error() [2/2]

template<typename T_Error >
T_Error& zpp::error_result< T_Error >::error ( )
inlinenoexcept

return error value

Returns
the error value as a reference

Definition at line 64 of file result.hpp.

64  {
65  return m_error;
66  }

◆ operator=() [1/2]

template<typename T_Error >
error_result& zpp::error_result< T_Error >::operator= ( const error_result< T_Error > &  )
defaultnoexcept

◆ operator=() [2/2]

template<typename T_Error >
error_result& zpp::error_result< T_Error >::operator= ( error_result< T_Error > &&  )
defaultnoexcept

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