iox::cxx::success🔗
helper struct to create an expected which is signalling success more easily More...
#include <expected.hpp>
Public Functions🔗
Name | |
---|---|
success(const T & t) constructor which creates a success helper class by copying the value of t |
|
success(T && t) constructor which creates a success helper class by moving the value of t |
|
template \<typename... Targs> |
success(Targs &&... args) constructor which creates a success helper class by forwarding arguments to the constructor of T |
Public Attributes🔗
Name | |
---|---|
T | value |
Detailed Description🔗
template <typename T =void>
struct iox::cxx::success;
helper struct to create an expected which is signalling success more easily
Parameters:
- T type which the success helper class should contain
cxx::expected<int, float> callMe() {
//...
return cxx::success<int>(55);
}
Public Functions Documentation🔗
function success🔗
inline success(
const T & t
)
constructor which creates a success helper class by copying the value of t
Parameters:
- t value which should be later stored in an expected
function success🔗
inline success(
T && t
)
constructor which creates a success helper class by moving the value of t
Parameters:
- t value which should be later moved into an expected
function success🔗
template <typename... Targs>
inline success(
Targs &&... args
)
constructor which creates a success helper class by forwarding arguments to the constructor of T
Parameters:
- args... arguments which will be perfectly forwarded to the constructor
Public Attributes Documentation🔗
variable value🔗
T value;
Updated on 31 May 2022 at 15:29:15 CEST