iceoryx_hoofs 2.0.3
Public Member Functions | Public Attributes | List of all members
iox::cxx::error< T > Struct Template Reference

helper struct to create an expected which is signalling an error more easily More...

#include <iceoryx_hoofs/cxx/expected.hpp>

Public Member Functions

 error (const T &t) noexcept
 constructor which creates a error helper class by copying the value of t More...
 
 error (T &&t) noexcept
 constructor which creates a error helper class by moving the value of t More...
 
template<typename... Targs>
 error (Targs &&... args) noexcept
 constructor which creates a error helper class by forwarding arguments to the constructor of T More...
 

Public Attributes

value
 

Detailed Description

template<typename T>
struct iox::cxx::error< T >

helper struct to create an expected which is signalling an error more easily

Parameters
Ttype which the success helper class should contain
cxx::expected<float> callMe() {
//...
return cxx::error<float>(12.34f);
}
helper struct to create an expected which is signalling an error more easily
Definition: expected.hpp:92

Constructor & Destructor Documentation

◆ error() [1/3]

template<typename T >
iox::cxx::error< T >::error ( const T &  t)
noexcept

constructor which creates a error helper class by copying the value of t

Parameters
[in]tvalue which should be later stored in an expected

◆ error() [2/3]

template<typename T >
iox::cxx::error< T >::error ( T &&  t)
noexcept

constructor which creates a error helper class by moving the value of t

Parameters
[in]tvalue which should be later moved into an expected

◆ error() [3/3]

template<typename T >
template<typename... Targs>
iox::cxx::error< T >::error ( Targs &&...  args)
noexcept

constructor which creates a error helper class by forwarding arguments to the constructor of T

Parameters
[in]args...arguments which will be perfectly forwarded to the constructor

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