iceoryx2
C++ Bindings
Loading...
Searching...
No Matches
iox2::bb::stl::Expected< T, E > Class Template Reference

#include <expected.hpp>

Public Member Functions

constexpr Expected ()
template<typename U, typename V = std::remove_cv_t<T>, std::enable_if_t< std::is_convertible< U, V >::value &&std::is_same< U, V >::value, bool > = true>
constexpr Expected (U &&value)
template<typename U, typename V = std::remove_cv_t<T>, std::enable_if_t< std::is_convertible< U, V >::value &&!std::is_same< U, V >::value, bool > = true>
constexpr Expected (U &&value)
constexpr Expected (const Unexpected< E > &error)
constexpr Expected (Unexpected< E > &&error)
template<typename... Args>
constexpr Expected (InPlaceT, Args &&... args)
template<typename... Args>
constexpr Expected (UnexpectT, Args &&... args)
constexpr Expected (const Expected &)=default
constexpr Expected (Expected &&rhs) noexcept=default
 ~Expected ()=default
constexpr auto operator= (const Expected &) -> Expected &=default
constexpr auto operator= (Expected &&rhs) noexcept -> Expected &=default
constexpr auto has_value () const noexcept -> bool
constexpr operator bool () const noexcept
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
constexpr auto value () const &noexcept -> void
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
constexpr auto value () &&noexcept -> void
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto value (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &noexcept -> U &
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto value (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &noexcept -> const U &
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto value (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &&noexcept -> U &&
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto value (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &&noexcept -> const U &&
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
constexpr auto operator* () const noexcept -> U
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator* () &noexcept -> U &
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator* () const &noexcept -> const U &
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator* () &&noexcept -> U &&
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator* () const &&noexcept -> const U &&
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator-> () noexcept -> U *
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr auto operator-> () const noexcept -> const U *
constexpr auto error (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &noexcept -> E &
constexpr auto error (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &noexcept -> const E &
constexpr auto error (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &&noexcept -> E &&
constexpr auto error (bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &&noexcept -> const E &&

Detailed Description

template<typename T, typename E>
class iox2::bb::stl::Expected< T, E >

Definition at line 79 of file expected.hpp.

Constructor & Destructor Documentation

◆ Expected() [1/9]

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::Expected ( )
inlineconstexpr

Definition at line 85 of file expected.hpp.

Referenced by Expected(), Expected(), operator=(), and operator=().

◆ Expected() [2/9]

template<typename T, typename E>
template<typename U, typename V = std::remove_cv_t<T>, std::enable_if_t< std::is_convertible< U, V >::value &&std::is_same< U, V >::value, bool > = true>
iox2::bb::stl::Expected< T, E >::Expected ( U && value)
inlineconstexpr

Definition at line 93 of file expected.hpp.

References value().

◆ Expected() [3/9]

template<typename T, typename E>
template<typename U, typename V = std::remove_cv_t<T>, std::enable_if_t< std::is_convertible< U, V >::value &&!std::is_same< U, V >::value, bool > = true>
iox2::bb::stl::Expected< T, E >::Expected ( U && value)
inlineexplicitconstexpr

Definition at line 100 of file expected.hpp.

References value().

◆ Expected() [4/9]

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::Expected ( const Unexpected< E > & error)
inlineconstexpr

Definition at line 105 of file expected.hpp.

References error().

◆ Expected() [5/9]

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::Expected ( Unexpected< E > && error)
inlineconstexpr

Definition at line 110 of file expected.hpp.

References error().

◆ Expected() [6/9]

template<typename T, typename E>
template<typename... Args>
iox2::bb::stl::Expected< T, E >::Expected ( InPlaceT ,
Args &&... args )
inlineconstexpr

Definition at line 116 of file expected.hpp.

◆ Expected() [7/9]

template<typename T, typename E>
template<typename... Args>
iox2::bb::stl::Expected< T, E >::Expected ( UnexpectT ,
Args &&... args )
inlineconstexpr

Definition at line 122 of file expected.hpp.

◆ Expected() [8/9]

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::Expected ( const Expected< T, E > & )
constexprdefault

References Expected().

◆ Expected() [9/9]

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::Expected ( Expected< T, E > && rhs)
constexprdefaultnoexcept

References Expected().

◆ ~Expected()

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::~Expected ( )
default

Member Function Documentation

◆ error() [1/4]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::error ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) &&->E &&
inlineconstexprnoexcept

Definition at line 225 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ error() [2/4]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::error ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) &->E &
inlineconstexprnoexcept

Definition at line 216 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

Referenced by Expected(), and Expected().

◆ error() [3/4]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::error ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const &&->constE &&
inlineconstexprnoexcept

Definition at line 230 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ error() [4/4]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::error ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const &->constE &
inlineconstexprnoexcept

Definition at line 220 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ has_value()

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::has_value ( ) const->bool
inlineconstexprnoexcept

Definition at line 136 of file expected.hpp.

Referenced by operator bool().

◆ operator bool()

template<typename T, typename E>
iox2::bb::stl::Expected< T, E >::operator bool ( ) const
inlineexplicitconstexprnoexcept

Definition at line 140 of file expected.hpp.

References has_value().

◆ operator*() [1/5]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator* ( ) &&->U &&
inlineconstexprnoexcept

Definition at line 193 of file expected.hpp.

◆ operator*() [2/5]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator* ( ) &->U &
inlineconstexprnoexcept

Definition at line 183 of file expected.hpp.

References value().

◆ operator*() [3/5]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator* ( ) const &&->constU &&
inlineconstexprnoexcept

Definition at line 198 of file expected.hpp.

◆ operator*() [4/5]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator* ( ) const &->constU &
inlineconstexprnoexcept

Definition at line 188 of file expected.hpp.

References value().

◆ operator*() [5/5]

template<typename T, typename E>
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator* ( ) const->U
inlineconstexprnoexcept

Definition at line 179 of file expected.hpp.

◆ operator->() [1/2]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator-> ( ) const->constU *
inlineconstexprnoexcept

Definition at line 210 of file expected.hpp.

References value().

◆ operator->() [2/2]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::operator-> ( ) ->U *
inlineconstexprnoexcept

Definition at line 205 of file expected.hpp.

References value().

◆ operator=() [1/2]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::operator= ( const Expected< T, E > & ) ->Expected &=default
constexprdefault

References Expected().

◆ operator=() [2/2]

template<typename T, typename E>
auto iox2::bb::stl::Expected< T, E >::operator= ( Expected< T, E > && rhs) ->Expected &=default
constexprdefaultnoexcept

References Expected().

◆ value() [1/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( ) &&->void
inlineconstexprnoexcept

Definition at line 150 of file expected.hpp.

◆ value() [2/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t< std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( ) const &->void
inlineconstexprnoexcept

Definition at line 146 of file expected.hpp.

Referenced by Expected(), operator*(), operator*(), operator->(), and operator->().

◆ value() [3/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) &&->U &&
inlineconstexprnoexcept

Definition at line 165 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ value() [4/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) &->U &
inlineconstexprnoexcept

Definition at line 154 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ value() [5/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const &&->constU &&
inlineconstexprnoexcept

Definition at line 171 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().

◆ value() [6/6]

template<typename T, typename E>
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
auto iox2::bb::stl::Expected< T, E >::value ( bb::detail::SourceLocation location = bb::detail::SourceLocation::current()) const &->constU &
inlineconstexprnoexcept

Definition at line 159 of file expected.hpp.

References iox2::bb::detail::SourceLocation::current().


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