WPILibC++ 2024.3.2
wpi::expected< T, E > Class Template Reference

An expected<T, E> object is an object that contains the storage for another object and manages the lifetime of this contained object T. More...

Inheritance diagram for wpi::expected< T, E >:
wpi::detail::expected_move_assign_base< T, E, bool > wpi::detail::expected_delete_ctor_base< T, E, EnableCopy, EnableMove > wpi::detail::expected_delete_assign_base< T, E, EnableCopy, EnableMove > wpi::detail::expected_default_ctor_base< T, E, Enable >

Public Types

typedef T value_type
 
typedef E error_type
 
typedef unexpected< E > unexpected_type
 

Public Member Functions

template<class F >
WPI_EXPECTED_11_CONSTEXPR auto and_then (F &&f) &-> decltype(and_then_impl(std::declval< expected & >(), std::forward< F >(f)))
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR auto and_then (F &&f) &&-> decltype(and_then_impl(std::declval< expected && >(), std::forward< F >(f)))
 
template<class F >
constexpr auto and_then (F &&f) const &-> decltype(and_then_impl(std::declval< expected const & >(), std::forward< F >(f)))
 
template<class F >
constexpr auto and_then (F &&f) const &&-> decltype(and_then_impl(std::declval< expected const && >(), std::forward< F >(f)))
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected >(), std::declval< F && >())) map (F &&f) &&
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected >(), std::declval< F && >())) transform (F &&f) &&
 
template<class F >
expected WPI_EXPECTED_11_CONSTEXPR or_else (F &&f) &
 
template<class F >
expected WPI_EXPECTED_11_CONSTEXPR or_else (F &&f) &&
 
template<class F >
expected constexpr or_else (F &&f) const &
 
template<class F >
expected constexpr or_else (F &&f) const &&
 
constexpr expected ()=default
 
constexpr expected (const expected &rhs)=default
 
constexpr expected (expected &&rhs)=default
 
expectedoperator= (const expected &rhs)=default
 
expectedoperator= (expected &&rhs)=default
 
template<class... Args, detail::enable_if_t< std::is_constructible< T, Args &&... >::value > * = nullptr>
constexpr expected (in_place_t, Args &&...args)
 
template<class U , class... Args, detail::enable_if_t< std::is_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
constexpr expected (in_place_t, std::initializer_list< U > il, Args &&...args)
 
template<class G = E, detail::enable_if_t< std::is_constructible< E, const G & >::value > * = nullptr, detail::enable_if_t<!std::is_convertible< const G &, E >::value > * = nullptr>
constexpr expected (const unexpected< G > &e)
 
template<class G = E, detail::enable_if_t< std::is_constructible< E, const G & >::value > * = nullptr, detail::enable_if_t< std::is_convertible< const G &, E >::value > * = nullptr>
constexpr expected (unexpected< G > const &e)
 
template<class G = E, detail::enable_if_t< std::is_constructible< E, G && >::value > * = nullptr, detail::enable_if_t<!std::is_convertible< G &&, E >::value > * = nullptr>
constexpr expected (unexpected< G > &&e) noexcept(std::is_nothrow_constructible< E, G && >::value)
 
template<class G = E, detail::enable_if_t< std::is_constructible< E, G && >::value > * = nullptr, detail::enable_if_t< std::is_convertible< G &&, E >::value > * = nullptr>
constexpr expected (unexpected< G > &&e) noexcept(std::is_nothrow_constructible< E, G && >::value)
 
template<class... Args, detail::enable_if_t< std::is_constructible< E, Args &&... >::value > * = nullptr>
constexpr expected (unexpect_t, Args &&...args)
 
template<class U , class... Args, detail::enable_if_t< std::is_constructible< E, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
constexpr expected (unexpect_t, std::initializer_list< U > il, Args &&...args)
 
template<class U , class G , detail::enable_if_t<!(std::is_convertible< U const &, T >::value &&std::is_convertible< G const &, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, const U &, const G & > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR expected (const expected< U, G > &rhs)
 
template<class U , class G , detail::enable_if_t<(std::is_convertible< U const &, T >::value &&std::is_convertible< G const &, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, const U &, const G & > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR expected (const expected< U, G > &rhs)
 
template<class U , class G , detail::enable_if_t<!(std::is_convertible< U &&, T >::value &&std::is_convertible< G &&, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, U &&, G && > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR expected (expected< U, G > &&rhs)
 
template<class U , class G , detail::enable_if_t<(std::is_convertible< U &&, T >::value &&std::is_convertible< G &&, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, U &&, G && > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR expected (expected< U, G > &&rhs)
 
template<class U = T, detail::enable_if_t<!std::is_convertible< U &&, T >::value > * = nullptr, detail::expected_enable_forward_value< T, E, U > * = nullptr>
WPI_EXPECTED_MSVC2015_CONSTEXPR expected (U &&v)
 
template<class U = T, detail::enable_if_t< std::is_convertible< U &&, T >::value > * = nullptr, detail::expected_enable_forward_value< T, E, U > * = nullptr>
WPI_EXPECTED_MSVC2015_CONSTEXPR expected (U &&v)
 
template<class U = T, class G = T, detail::enable_if_t< std::is_nothrow_constructible< T, U && >::value > * = nullptr, detail::enable_if_t<!std::is_void< G >::value > * = nullptr, detail::enable_if_t<(!std::is_same< expected< T, E >, detail::decay_t< U > >::value &&!detail::conjunction< std::is_scalar< T >, std::is_same< T, detail::decay_t< U > > >::value &&std::is_constructible< T, U >::value &&std::is_assignable< G &, U >::value &&std::is_nothrow_move_constructible< E >::value)> * = nullptr>
expectedoperator= (U &&v)
 
template<class U = T, class G = T, detail::enable_if_t<!std::is_nothrow_constructible< T, U && >::value > * = nullptr, detail::enable_if_t<!std::is_void< U >::value > * = nullptr, detail::enable_if_t<(!std::is_same< expected< T, E >, detail::decay_t< U > >::value &&!detail::conjunction< std::is_scalar< T >, std::is_same< T, detail::decay_t< U > > >::value &&std::is_constructible< T, U >::value &&std::is_assignable< G &, U >::value &&std::is_nothrow_move_constructible< E >::value)> * = nullptr>
expectedoperator= (U &&v)
 
template<class G = E, detail::enable_if_t< std::is_nothrow_copy_constructible< G >::value &&std::is_assignable< G &, G >::value > * = nullptr>
expectedoperator= (const unexpected< G > &rhs)
 
template<class G = E, detail::enable_if_t< std::is_nothrow_move_constructible< G >::value &&std::is_move_assignable< G >::value > * = nullptr>
expectedoperator= (unexpected< G > &&rhs) noexcept
 
template<class... Args, detail::enable_if_t< std::is_nothrow_constructible< T, Args &&... >::value > * = nullptr>
void emplace (Args &&...args)
 
template<class... Args, detail::enable_if_t<!std::is_nothrow_constructible< T, Args &&... >::value > * = nullptr>
void emplace (Args &&...args)
 
template<class U , class... Args, detail::enable_if_t< std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
void emplace (std::initializer_list< U > il, Args &&...args)
 
template<class U , class... Args, detail::enable_if_t<!std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
void emplace (std::initializer_list< U > il, Args &&...args)
 
template<class OT = T, class OE = E>
detail::enable_if_t< detail::is_swappable< OT >::value &&detail::is_swappable< OE >::value &&(std::is_nothrow_move_constructible< OT >::value||std::is_nothrow_move_constructible< OE >::value)> swap (expected &rhs) noexcept(std::is_nothrow_move_constructible< T >::value &&detail::is_nothrow_swappable< T >::value &&std::is_nothrow_move_constructible< E >::value &&detail::is_nothrow_swappable< E >::value)
 
constexpr const T * operator-> () const
 
WPI_EXPECTED_11_CONSTEXPR T * operator-> ()
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
constexpr const U & operator* () const &
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U & operator* () &
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
constexpr const U && operator* () const &&
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U && operator* () &&
 
constexpr bool has_value () const noexcept
 
constexpr operator bool () const noexcept
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR const U & value () const &
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U & value () &
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR const U && value () const &&
 
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U && value () &&
 
constexpr const E & error () const &
 
WPI_EXPECTED_11_CONSTEXPR E & error () &
 
constexpr const E && error () const &&
 
WPI_EXPECTED_11_CONSTEXPR E && error () &&
 
template<class U >
constexpr T value_or (U &&v) const &
 
template<class U >
WPI_EXPECTED_11_CONSTEXPRvalue_or (U &&v) &&
 

Public Attributes

template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected & >(), std::declval< F && >())) map (F &&f) &
 
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected & >(), std::declval< F && >())) map (F &&f) const &
 
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected && >(), std::declval< F && >())) map (F &&f) const &&
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected & >(), std::declval< F && >())) transform (F &&f) &
 
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected & >(), std::declval< F && >())) transform (F &&f) const &
 
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected && >(), std::declval< F && >())) transform (F &&f) const &&
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) map_error (F &&f) &
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected && >(), std::declval< F && >())) map_error (F &&f) &&
 
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected & >(), std::declval< F && >())) map_error (F &&f) const &
 
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected && >(), std::declval< F && >())) map_error (F &&f) const &&
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) transform_error (F &&f) &
 
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected && >(), std::declval< F && >())) transform_error (F &&f) &&
 
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected & >(), std::declval< F && >())) transform_error (F &&f) const &
 
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected && >(), std::declval< F && >())) transform_error (F &&f) const &&
 

Detailed Description

template<class T, class E>
class wpi::expected< T, E >

An expected<T, E> object is an object that contains the storage for another object and manages the lifetime of this contained object T.

Alternatively it could contain the storage for another unexpected object E. The contained object may not be initialized after the expected object has been initialized, and may not be destroyed before the expected object has been destroyed. The initialization state of the contained object is tracked by the expected object.

Member Typedef Documentation

◆ error_type

template<class T , class E >
typedef E wpi::expected< T, E >::error_type

◆ unexpected_type

template<class T , class E >
typedef unexpected<E> wpi::expected< T, E >::unexpected_type

◆ value_type

template<class T , class E >
typedef T wpi::expected< T, E >::value_type

Constructor & Destructor Documentation

◆ expected() [1/17]

template<class T , class E >
constexpr wpi::expected< T, E >::expected ( )
constexprdefault

◆ expected() [2/17]

template<class T , class E >
constexpr wpi::expected< T, E >::expected ( const expected< T, E > &  rhs)
constexprdefault

◆ expected() [3/17]

template<class T , class E >
constexpr wpi::expected< T, E >::expected ( expected< T, E > &&  rhs)
constexprdefault

◆ expected() [4/17]

template<class T , class E >
template<class... Args, detail::enable_if_t< std::is_constructible< T, Args &&... >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( in_place_t  ,
Args &&...  args 
)
inlineconstexpr

◆ expected() [5/17]

template<class T , class E >
template<class U , class... Args, detail::enable_if_t< std::is_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineconstexpr

◆ expected() [6/17]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_constructible< E, const G & >::value > * = nullptr, detail::enable_if_t<!std::is_convertible< const G &, E >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( const unexpected< G > &  e)
inlineexplicitconstexpr

◆ expected() [7/17]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_constructible< E, const G & >::value > * = nullptr, detail::enable_if_t< std::is_convertible< const G &, E >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( unexpected< G > const &  e)
inlineconstexpr

◆ expected() [8/17]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_constructible< E, G && >::value > * = nullptr, detail::enable_if_t<!std::is_convertible< G &&, E >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( unexpected< G > &&  e)
inlineexplicitconstexprnoexcept

◆ expected() [9/17]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_constructible< E, G && >::value > * = nullptr, detail::enable_if_t< std::is_convertible< G &&, E >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( unexpected< G > &&  e)
inlineconstexprnoexcept

◆ expected() [10/17]

template<class T , class E >
template<class... Args, detail::enable_if_t< std::is_constructible< E, Args &&... >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( unexpect_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

◆ expected() [11/17]

template<class T , class E >
template<class U , class... Args, detail::enable_if_t< std::is_constructible< E, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
constexpr wpi::expected< T, E >::expected ( unexpect_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicitconstexpr

◆ expected() [12/17]

template<class T , class E >
template<class U , class G , detail::enable_if_t<!(std::is_convertible< U const &, T >::value &&std::is_convertible< G const &, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, const U &, const G & > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::expected ( const expected< U, G > &  rhs)
inlineexplicit

◆ expected() [13/17]

template<class T , class E >
template<class U , class G , detail::enable_if_t<(std::is_convertible< U const &, T >::value &&std::is_convertible< G const &, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, const U &, const G & > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::expected ( const expected< U, G > &  rhs)
inline

◆ expected() [14/17]

template<class T , class E >
template<class U , class G , detail::enable_if_t<!(std::is_convertible< U &&, T >::value &&std::is_convertible< G &&, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, U &&, G && > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::expected ( expected< U, G > &&  rhs)
inlineexplicit

◆ expected() [15/17]

template<class T , class E >
template<class U , class G , detail::enable_if_t<(std::is_convertible< U &&, T >::value &&std::is_convertible< G &&, E >::value)> * = nullptr, detail::expected_enable_from_other< T, E, U, G, U &&, G && > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::expected ( expected< U, G > &&  rhs)
inline

◆ expected() [16/17]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_convertible< U &&, T >::value > * = nullptr, detail::expected_enable_forward_value< T, E, U > * = nullptr>
WPI_EXPECTED_MSVC2015_CONSTEXPR wpi::expected< T, E >::expected ( U &&  v)
inlineexplicit

◆ expected() [17/17]

template<class T , class E >
template<class U = T, detail::enable_if_t< std::is_convertible< U &&, T >::value > * = nullptr, detail::expected_enable_forward_value< T, E, U > * = nullptr>
WPI_EXPECTED_MSVC2015_CONSTEXPR wpi::expected< T, E >::expected ( U &&  v)
inline

Member Function Documentation

◆ and_then() [1/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR auto wpi::expected< T, E >::and_then ( F &&  f) && -> decltype(and_then_impl(std::declval<expected &&>(), std::forward<F>(f)))
inline

◆ and_then() [2/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR auto wpi::expected< T, E >::and_then ( F &&  f) & -> decltype(and_then_impl(std::declval<expected &>(), std::forward<F>(f)))
inline

◆ and_then() [3/4]

template<class T , class E >
template<class F >
constexpr auto wpi::expected< T, E >::and_then ( F &&  f) const && -> decltype(and_then_impl( std::declval<expected const &&>(), std::forward<F>(f)))
inlineconstexpr

◆ and_then() [4/4]

template<class T , class E >
template<class F >
constexpr auto wpi::expected< T, E >::and_then ( F &&  f) const & -> decltype(and_then_impl( std::declval<expected const &>(), std::forward<F>(f)))
inlineconstexpr

◆ emplace() [1/4]

template<class T , class E >
template<class... Args, detail::enable_if_t< std::is_nothrow_constructible< T, Args &&... >::value > * = nullptr>
void wpi::expected< T, E >::emplace ( Args &&...  args)
inline

◆ emplace() [2/4]

template<class T , class E >
template<class... Args, detail::enable_if_t<!std::is_nothrow_constructible< T, Args &&... >::value > * = nullptr>
void wpi::expected< T, E >::emplace ( Args &&...  args)
inline

◆ emplace() [3/4]

template<class T , class E >
template<class U , class... Args, detail::enable_if_t< std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
void wpi::expected< T, E >::emplace ( std::initializer_list< U >  il,
Args &&...  args 
)
inline

◆ emplace() [4/4]

template<class T , class E >
template<class U , class... Args, detail::enable_if_t<!std::is_nothrow_constructible< T, std::initializer_list< U > &, Args &&... >::value > * = nullptr>
void wpi::expected< T, E >::emplace ( std::initializer_list< U >  il,
Args &&...  args 
)
inline

◆ error() [1/4]

template<class T , class E >
WPI_EXPECTED_11_CONSTEXPR E & wpi::expected< T, E >::error ( ) &
inline

◆ error() [2/4]

template<class T , class E >
WPI_EXPECTED_11_CONSTEXPR E && wpi::expected< T, E >::error ( ) &&
inline

◆ error() [3/4]

template<class T , class E >
constexpr const E & wpi::expected< T, E >::error ( ) const &
inlineconstexpr

◆ error() [4/4]

template<class T , class E >
constexpr const E && wpi::expected< T, E >::error ( ) const &&
inlineconstexpr

◆ has_value()

template<class T , class E >
constexpr bool wpi::expected< T, E >::has_value ( ) const
inlineconstexprnoexcept

◆ map()

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected >(), std::declval< F && >())) wpi::expected< T, E >::map ( F &&  f) &&
inline

◆ operator bool()

template<class T , class E >
constexpr wpi::expected< T, E >::operator bool ( ) const
inlineexplicitconstexprnoexcept

◆ operator*() [1/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U & wpi::expected< T, E >::operator* ( ) &
inline

◆ operator*() [2/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U && wpi::expected< T, E >::operator* ( ) &&
inline

◆ operator*() [3/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
constexpr const U & wpi::expected< T, E >::operator* ( ) const &
inlineconstexpr

◆ operator*() [4/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
constexpr const U && wpi::expected< T, E >::operator* ( ) const &&
inlineconstexpr

◆ operator->() [1/2]

template<class T , class E >
WPI_EXPECTED_11_CONSTEXPR T * wpi::expected< T, E >::operator-> ( )
inline

◆ operator->() [2/2]

template<class T , class E >
constexpr const T * wpi::expected< T, E >::operator-> ( ) const
inlineconstexpr

◆ operator=() [1/6]

template<class T , class E >
expected & wpi::expected< T, E >::operator= ( const expected< T, E > &  rhs)
default

◆ operator=() [2/6]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_nothrow_copy_constructible< G >::value &&std::is_assignable< G &, G >::value > * = nullptr>
expected & wpi::expected< T, E >::operator= ( const unexpected< G > &  rhs)
inline

◆ operator=() [3/6]

template<class T , class E >
expected & wpi::expected< T, E >::operator= ( expected< T, E > &&  rhs)
default

◆ operator=() [4/6]

template<class T , class E >
template<class U = T, class G = T, detail::enable_if_t< std::is_nothrow_constructible< T, U && >::value > * = nullptr, detail::enable_if_t<!std::is_void< G >::value > * = nullptr, detail::enable_if_t<(!std::is_same< expected< T, E >, detail::decay_t< U > >::value &&!detail::conjunction< std::is_scalar< T >, std::is_same< T, detail::decay_t< U > > >::value &&std::is_constructible< T, U >::value &&std::is_assignable< G &, U >::value &&std::is_nothrow_move_constructible< E >::value)> * = nullptr>
expected & wpi::expected< T, E >::operator= ( U &&  v)
inline

◆ operator=() [5/6]

template<class T , class E >
template<class U = T, class G = T, detail::enable_if_t<!std::is_nothrow_constructible< T, U && >::value > * = nullptr, detail::enable_if_t<!std::is_void< U >::value > * = nullptr, detail::enable_if_t<(!std::is_same< expected< T, E >, detail::decay_t< U > >::value &&!detail::conjunction< std::is_scalar< T >, std::is_same< T, detail::decay_t< U > > >::value &&std::is_constructible< T, U >::value &&std::is_assignable< G &, U >::value &&std::is_nothrow_move_constructible< E >::value)> * = nullptr>
expected & wpi::expected< T, E >::operator= ( U &&  v)
inline

◆ operator=() [6/6]

template<class T , class E >
template<class G = E, detail::enable_if_t< std::is_nothrow_move_constructible< G >::value &&std::is_move_assignable< G >::value > * = nullptr>
expected & wpi::expected< T, E >::operator= ( unexpected< G > &&  rhs)
inlinenoexcept

◆ or_else() [1/4]

template<class T , class E >
template<class F >
expected WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::or_else ( F &&  f) &
inline

◆ or_else() [2/4]

template<class T , class E >
template<class F >
expected WPI_EXPECTED_11_CONSTEXPR wpi::expected< T, E >::or_else ( F &&  f) &&
inline

◆ or_else() [3/4]

template<class T , class E >
template<class F >
expected constexpr wpi::expected< T, E >::or_else ( F &&  f) const &
inlineconstexpr

◆ or_else() [4/4]

template<class T , class E >
template<class F >
expected constexpr wpi::expected< T, E >::or_else ( F &&  f) const &&
inlineconstexpr

◆ swap()

template<class T , class E >
template<class OT = T, class OE = E>
detail::enable_if_t< detail::is_swappable< OT >::value && detail::is_swappable< OE >::value &&(std::is_nothrow_move_constructible< OT >::value|| std::is_nothrow_move_constructible< OE >::value)> wpi::expected< T, E >::swap ( expected< T, E > &  rhs)
inlinenoexcept

◆ transform()

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl(std::declval< expected >(), std::declval< F && >())) wpi::expected< T, E >::transform ( F &&  f) &&
inline

◆ value() [1/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U & wpi::expected< T, E >::value ( ) &
inline

◆ value() [2/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR U && wpi::expected< T, E >::value ( ) &&
inline

◆ value() [3/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR const U & wpi::expected< T, E >::value ( ) const &
inline

◆ value() [4/4]

template<class T , class E >
template<class U = T, detail::enable_if_t<!std::is_void< U >::value > * = nullptr>
WPI_EXPECTED_11_CONSTEXPR const U && wpi::expected< T, E >::value ( ) const &&
inline

◆ value_or() [1/2]

template<class T , class E >
template<class U >
WPI_EXPECTED_11_CONSTEXPR T wpi::expected< T, E >::value_or ( U &&  v) &&
inline

◆ value_or() [2/2]

template<class T , class E >
template<class U >
constexpr T wpi::expected< T, E >::value_or ( U &&  v) const &
inlineconstexpr

Member Data Documentation

◆ map [1/3]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl( std::declval< expected & >(), std::declval< F && >())) wpi::expected< T, E >::map(F &&f) &
inline

◆ map [2/3]

template<class T , class E >
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected & >(), std::declval< F && >())) wpi::expected< T, E >::map(F &&f) const &
inlineconstexpr

◆ map [3/3]

template<class T , class E >
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected && >(), std::declval< F && >())) wpi::expected< T, E >::map(F &&f) const &&
inlineconstexpr

◆ map_error [1/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) wpi::expected< T, E >::map_error(F &&f) &
inline

◆ map_error [2/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected && >(), std::declval< F && >())) wpi::expected< T, E >::map_error(F &&f) &&
inline

◆ map_error [3/4]

template<class T , class E >
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected & >(), std::declval< F && >())) wpi::expected< T, E >::map_error(F &&f) const &
inlineconstexpr

◆ map_error [4/4]

template<class T , class E >
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected && >(), std::declval< F && >())) wpi::expected< T, E >::map_error(F &&f) const &&
inlineconstexpr

◆ transform [1/3]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(expected_map_impl( std::declval< expected & >(), std::declval< F && >())) wpi::expected< T, E >::transform(F &&f) &
inline

◆ transform [2/3]

template<class T , class E >
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected & >(), std::declval< F && >())) wpi::expected< T, E >::transform(F &&f) const &
inlineconstexpr

◆ transform [3/3]

template<class T , class E >
template<class F >
constexpr decltype(expected_map_impl(std::declval< const expected && >(), std::declval< F && >())) wpi::expected< T, E >::transform(F &&f) const &&
inlineconstexpr

◆ transform_error [1/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected & >(), std::declval< F && >())) wpi::expected< T, E >::transform_error(F &&f) &
inline

◆ transform_error [2/4]

template<class T , class E >
template<class F >
WPI_EXPECTED_11_CONSTEXPR decltype(map_error_impl(std::declval< expected && >(), std::declval< F && >())) wpi::expected< T, E >::transform_error(F &&f) &&
inline

◆ transform_error [3/4]

template<class T , class E >
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected & >(), std::declval< F && >())) wpi::expected< T, E >::transform_error(F &&f) const &
inlineconstexpr

◆ transform_error [4/4]

template<class T , class E >
template<class F >
constexpr decltype(map_error_impl(std::declval< const expected && >(), std::declval< F && >())) wpi::expected< T, E >::transform_error(F &&f) const &&
inlineconstexpr

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