Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | Friends | List of all members
android::base::unexpected< E > Class Template Reference

#include <expected.h>

Public Member Functions

constexpr unexpected (const unexpected &)=default
 
constexpr unexpected (unexpected &&) noexcept(std::is_nothrow_move_constructible_v< E >)=default
 
template<class Err = E _ENABLE_IF( std::is_constructible_v<E, Err> && !std::is_same_v<std::remove_cv_t<std::remove_reference_t<E>>, std::in_place_t> && !std::is_same_v<std::remove_cv_t<std::remove_reference_t<E>>, unexpected>)>
constexpr unexpected (Err &&e)
 
template<class U , class... Args _ENABLE_IF>
constexpr unexpected (std::in_place_t, std::initializer_list< U > il, Args &&... args)
 
template<class Err _ENABLE_IF>
constexpr unexpected (const unexpected< Err > &rhs)
 
template<class Err _ENABLE_IF>
constexpr unexpected (const unexpected< Err > &rhs)
 
template<class Err _ENABLE_IF>
constexpr unexpected (unexpected< Err > &&rhs)
 
template<class Err _ENABLE_IF>
constexpr unexpected (unexpected< Err > &&rhs)
 
constexpr unexpectedoperator= (const unexpected &)=default
 
constexpr unexpectedoperator= (unexpected &&) noexcept(std::is_nothrow_move_assignable_v< E >)=default
 
template<class Err = E>
constexpr unexpectedoperator= (const unexpected< Err > &rhs)
 
template<class Err = E>
constexpr unexpectedoperator= (unexpected< Err > &&rhs)
 
constexpr const E & value () const &noexcept
 
constexpr E & value () &noexcept
 
constexpr const E && value () const &&noexcept
 
constexpr E && value () &&noexcept
 
void swap (unexpected &other) noexcept(std::is_nothrow_swappable_v< E >)
 

Private Attributes

val_
 

Friends

template<class E1 , class E2 >
constexpr bool operator== (const unexpected< E1 > &e1, const unexpected< E2 > &e2)
 
template<class E1 , class E2 >
constexpr bool operator!= (const unexpected< E1 > &e1, const unexpected< E2 > &e2)
 
template<class E1 >
void swap (unexpected< E1 > &x, unexpected< E1 > &y) noexcept(noexcept(x.swap(y)))
 

Constructor & Destructor Documentation

◆ unexpected() [1/8]

template<class E >
constexpr android::base::unexpected< E >::unexpected ( const unexpected< E > &  )
constexprdefault

◆ unexpected() [2/8]

template<class E >
constexpr android::base::unexpected< E >::unexpected ( unexpected< E > &&  ) const
constexprdefaultnoexcept

◆ unexpected() [3/8]

template<class E >
template<class Err = E _ENABLE_IF( std::is_constructible_v<E, Err> && !std::is_same_v<std::remove_cv_t<std::remove_reference_t<E>>, std::in_place_t> && !std::is_same_v<std::remove_cv_t<std::remove_reference_t<E>>, unexpected>)>
constexpr android::base::unexpected< E >::unexpected ( Err &&  e)
inlineconstexpr

◆ unexpected() [4/8]

template<class E >
template<class U , class... Args _ENABLE_IF>
constexpr android::base::unexpected< E >::unexpected ( std::in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicitconstexpr

◆ unexpected() [5/8]

template<class E >
template<class Err _ENABLE_IF>
constexpr android::base::unexpected< E >::unexpected ( const unexpected< Err > &  rhs)
inlineconstexpr

◆ unexpected() [6/8]

template<class E >
template<class Err _ENABLE_IF>
constexpr android::base::unexpected< E >::unexpected ( const unexpected< Err > &  rhs)
inlineexplicitconstexpr

◆ unexpected() [7/8]

template<class E >
template<class Err _ENABLE_IF>
constexpr android::base::unexpected< E >::unexpected ( unexpected< Err > &&  rhs)
inlineconstexpr

◆ unexpected() [8/8]

template<class E >
template<class Err _ENABLE_IF>
constexpr android::base::unexpected< E >::unexpected ( unexpected< Err > &&  rhs)
inlineexplicitconstexpr

Member Function Documentation

◆ operator=() [1/4]

template<class E >
constexpr unexpected & android::base::unexpected< E >::operator= ( const unexpected< E > &  )
constexprdefault

◆ operator=() [2/4]

template<class E >
template<class Err = E>
constexpr unexpected & android::base::unexpected< E >::operator= ( const unexpected< Err > &  rhs)
inlineconstexpr

◆ operator=() [3/4]

template<class E >
constexpr unexpected & android::base::unexpected< E >::operator= ( unexpected< E > &&  )
constexprdefaultnoexcept

◆ operator=() [4/4]

template<class E >
template<class Err = E>
constexpr unexpected & android::base::unexpected< E >::operator= ( unexpected< Err > &&  rhs)
inlineconstexpr

◆ swap()

template<class E >
void android::base::unexpected< E >::swap ( unexpected< E > &  other)
inlinenoexcept

◆ value() [1/4]

template<class E >
constexpr E && android::base::unexpected< E >::value ( ) &&
inlineconstexprnoexcept

◆ value() [2/4]

template<class E >
constexpr E & android::base::unexpected< E >::value ( ) &
inlineconstexprnoexcept

◆ value() [3/4]

template<class E >
constexpr const E && android::base::unexpected< E >::value ( ) const &&
inlineconstexprnoexcept

◆ value() [4/4]

template<class E >
constexpr const E & android::base::unexpected< E >::value ( ) const &
inlineconstexprnoexcept

Friends And Related Function Documentation

◆ operator!=

template<class E >
template<class E1 , class E2 >
constexpr bool operator!= ( const unexpected< E1 > &  e1,
const unexpected< E2 > &  e2 
)
friend

◆ operator==

template<class E >
template<class E1 , class E2 >
constexpr bool operator== ( const unexpected< E1 > &  e1,
const unexpected< E2 > &  e2 
)
friend

◆ swap

template<class E >
template<class E1 >
void swap ( unexpected< E1 > &  x,
unexpected< E1 > &  y 
)
friend

Member Data Documentation

◆ val_

template<class E >
E android::base::unexpected< E >::val_
private

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