iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
expected.hpp File Reference
#include "iox2/bb/detail/attributes.hpp"
#include "iox2/bb/detail/source_location.hpp"
#include "iox2/legacy/detail/expected_helper.hpp"
#include "iox2/legacy/logging.hpp"
#include <type_traits>
#include <typeinfo>
#include "iox2/legacy/detail/expected.inl"

Go to the source code of this file.

Classes

class  iox2::legacy::expected< ValueType, ErrorType >
 Implementation of the C++23 expected class which can contain an error or a success value. More...

Namespaces

namespace  iox2
namespace  iox2::legacy

Typedefs

template<typename T = void>
using iox2::legacy::success = detail::ok<T>
template<typename T>
using iox2::legacy::error = detail::err<T>

Functions

template<typename T = void, typename = enable_if_void_t<T>>
detail::ok< void > iox2::legacy::ok ()
 convenience function to create an 'expected' with a 'void' value type
template<typename T, typename = enable_if_non_void_t<T>>
detail::ok< T > iox2::legacy::ok (const T &value)
 convenience function to create an 'expected' with a value type by copy
template<typename T, typename = enable_if_non_void_t<T>, typename = enable_if_not_lvalue_referece_t<T>>
detail::ok< T > iox2::legacy::ok (T &&value)
 convenience function to create an 'expected' with a value type by move
template<typename T, typename... Targs, typename = enable_if_non_void_t<T>>
detail::ok< T > iox2::legacy::ok (Targs &&... args)
 convenience function to create an 'expected' with a value type by argument forwarding
template<typename T>
detail::err< T > iox2::legacy::err (const T &error)
 convenience function to create an 'expected' with an error type by copy
template<typename T, typename = enable_if_not_lvalue_referece_t<T>>
detail::err< T > iox2::legacy::err (T &&error)
 convenience function to create an 'expected' with an error type by move
template<typename T, typename... Targs>
detail::err< T > iox2::legacy::err (Targs &&... args)
 convenience function to create an 'expected' with an error type by argument forwarding
template<typename ValueType, typename ErrorType>
constexpr bool iox2::legacy::operator== (const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
 equality check for two distinct expected types
template<typename ValueType, typename ErrorType>
constexpr bool iox2::legacy::operator!= (const expected< ValueType, ErrorType > &lhs, const expected< ValueType, ErrorType > &rhs) noexcept
 inequality check for two distinct expected types