iceoryx_hoofs 2.0.5
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
iox::cxx::success< T > Struct Template Reference

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

#include <iceoryx_hoofs/cxx/expected.hpp>

Public Member Functions

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

Public Attributes

value
 

Detailed Description

template<typename T = void>
struct iox::cxx::success< T >

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

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

Constructor & Destructor Documentation

◆ success() [1/3]

template<typename T = void>
iox::cxx::success< T >::success ( const T &  t)
noexcept

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

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

◆ success() [2/3]

template<typename T = void>
iox::cxx::success< T >::success ( T &&  t)
noexcept

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

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

◆ success() [3/3]

template<typename T = void>
template<typename... Targs>
iox::cxx::success< T >::success ( Targs &&...  args)
noexcept

constructor which creates a success 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: