Skip to content

iox::cxx::error🔗

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

#include <iceoryx_hoofs/cxx/expected.hpp>

Public Functions🔗

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

Public Attributes🔗

Name
T value

Detailed Description🔗

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

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

Parameters:

  • T type which the success helper class should contain
cxx::expected<float> callMe() {
    //...
    return cxx::error<float>(12.34f);
}

Public Functions Documentation🔗

function error🔗

error(
    const T & t
)

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

Parameters:

  • t value which should be later stored in an expected

function error🔗

error(
    T && t
)

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

Parameters:

  • t value which should be later moved into an expected

function error🔗

template <typename... Targs>
error(
    Targs &&... args
)

constructor which creates a error 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 2 April 2022 at 16:37:47 CEST