iceoryx2
C++ Language 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 >
constexpr iox2::bb::stl::Expected< T, E >::Expected ( )
inlineconstexpr

Definition at line 85 of file expected.hpp.

◆ 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>
constexpr iox2::bb::stl::Expected< T, E >::Expected ( U &&  value)
inlineconstexpr

Definition at line 93 of file expected.hpp.

◆ 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>
constexpr iox2::bb::stl::Expected< T, E >::Expected ( U &&  value)
inlineexplicitconstexpr

Definition at line 100 of file expected.hpp.

◆ Expected() [4/9]

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

Definition at line 105 of file expected.hpp.

◆ Expected() [5/9]

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

Definition at line 110 of file expected.hpp.

◆ Expected() [6/9]

template<typename T , typename E >
template<typename... Args>
constexpr 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>
constexpr 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 >
constexpr iox2::bb::stl::Expected< T, E >::Expected ( const Expected< T, E > &  )
constexprdefault

◆ Expected() [9/9]

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

◆ ~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 >
constexpr 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.

◆ error() [2/4]

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

◆ error() [3/4]

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

Definition at line 230 of file expected.hpp.

◆ error() [4/4]

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

◆ has_value()

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

◆ operator bool()

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

Definition at line 140 of file expected.hpp.

◆ operator*() [1/5]

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

Definition at line 183 of file expected.hpp.

◆ operator*() [3/5]

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

Definition at line 188 of file expected.hpp.

◆ operator*() [5/5]

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

Definition at line 210 of file expected.hpp.

◆ operator->() [2/2]

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

Definition at line 205 of file expected.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ value() [1/6]

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

Definition at line 146 of file expected.hpp.

◆ value() [3/6]

template<typename T , typename E >
template<typename U = T, std::enable_if_t<!std::is_void< U >::value, bool > = true>
constexpr 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.

◆ value() [4/6]

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

◆ value() [5/6]

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

Definition at line 171 of file expected.hpp.

◆ value() [6/6]

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

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