MySQL 9.1.0
Source Code Documentation
stdx::unexpected< E > Class Template Reference

#include <expected.h>

Public Types

using error_type = E
 

Public Member Functions

constexpr unexpected (const unexpected &)=default
 
constexpr unexpected (unexpected &&) noexcept=default
 
template<class Err = E>
requires (!std::is_same_v<std::remove_cvref_t<Err>, unexpected> && !std::is_same_v<std::remove_cvref_t<Err>, std::in_place_t> && std::is_constructible_v<E, Err>)
constexpr unexpected (Err &&err) noexcept(std::is_nothrow_constructible_v< E, Err >)
 
template<class... Args>
requires std::constructible_from<E, Args &&...>
constexpr unexpected (std::in_place_t, Args &&...args) noexcept(std::is_nothrow_constructible_v< E, Args... >)
 
template<class U , class... Args>
requires (std::constructible_from<E, std::initializer_list<U>, Args && ...>)
constexpr unexpected (std::in_place_t, std::initializer_list< U > il, Args &&...args) noexcept(std::is_nothrow_constructible_v< E, std::initializer_list< U > &, Args... >)
 
constexpr unexpectedoperator= (const unexpected &)=default
 
constexpr unexpectedoperator= (unexpected &&) noexcept=default
 
constexpr error_typeerror () &noexcept
 
constexpr const error_typeerror () const &noexcept
 
constexpr error_type && error () &&noexcept
 
constexpr const error_type && error () const &&noexcept
 
constexpr void swap (unexpected &other) noexcept(std::is_nothrow_swappable_v< E >)
 

Private Attributes

error_type error_
 

Friends

template<class E2 >
constexpr friend bool operator== (const unexpected &lhs, const stdx::unexpected< E2 > &rhs)
 
constexpr friend void swap (unexpected &lhs, unexpected &rhs) noexcept(noexcept(lhs.swap(rhs)))
 

Member Typedef Documentation

◆ error_type

template<typename E >
using stdx::unexpected< E >::error_type = E

Constructor & Destructor Documentation

◆ unexpected() [1/5]

template<typename E >
constexpr stdx::unexpected< E >::unexpected ( const unexpected< E > &  )
constexprdefault

◆ unexpected() [2/5]

template<typename E >
constexpr stdx::unexpected< E >::unexpected ( unexpected< E > &&  )
constexprdefaultnoexcept

◆ unexpected() [3/5]

template<typename E >
template<class Err = E>
requires (!std::is_same_v<std::remove_cvref_t<Err>, unexpected> && !std::is_same_v<std::remove_cvref_t<Err>, std::in_place_t> && std::is_constructible_v<E, Err>)
constexpr stdx::unexpected< E >::unexpected ( Err &&  err)
inlineexplicitconstexprnoexcept

◆ unexpected() [4/5]

template<typename E >
template<class... Args>
requires std::constructible_from<E, Args &&...>
constexpr stdx::unexpected< E >::unexpected ( std::in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexprnoexcept

◆ unexpected() [5/5]

template<typename E >
template<class U , class... Args>
requires (std::constructible_from<E, std::initializer_list<U>, Args && ...>)
constexpr stdx::unexpected< E >::unexpected ( std::in_place_t  ,
std::initializer_list< U il,
Args &&...  args 
)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ error() [1/4]

template<typename E >
constexpr error_type && stdx::unexpected< E >::error ( ) &&
inlineconstexprnoexcept

◆ error() [2/4]

template<typename E >
constexpr error_type & stdx::unexpected< E >::error ( ) &
inlineconstexprnoexcept

◆ error() [3/4]

template<typename E >
constexpr const error_type && stdx::unexpected< E >::error ( ) const &&
inlineconstexprnoexcept

◆ error() [4/4]

template<typename E >
constexpr const error_type & stdx::unexpected< E >::error ( ) const &
inlineconstexprnoexcept

◆ operator=() [1/2]

template<typename E >
constexpr unexpected & stdx::unexpected< E >::operator= ( const unexpected< E > &  )
constexprdefault

◆ operator=() [2/2]

template<typename E >
constexpr unexpected & stdx::unexpected< E >::operator= ( unexpected< E > &&  )
constexprdefaultnoexcept

◆ swap()

template<typename E >
constexpr void stdx::unexpected< E >::swap ( unexpected< E > &  other)
inlineconstexprnoexcept

Friends And Related Function Documentation

◆ operator==

template<typename E >
template<class E2 >
constexpr friend bool operator== ( const unexpected< E > &  lhs,
const stdx::unexpected< E2 > &  rhs 
)
friend

◆ swap

template<typename E >
constexpr friend void swap ( unexpected< E > &  lhs,
unexpected< E > &  rhs 
)
friend

Member Data Documentation

◆ error_

template<typename E >
error_type stdx::unexpected< E >::error_
private

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