Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZStd::unexpected< E > Class Template Reference

#include <expected.h>

Public Member Functions

constexpr unexpected (const unexpected &)=default
 
constexpr unexpected (unexpected &&)=default
 
template<class Err = E, class = enable_if_t<!is_same_v<remove_cvref_t<Err>, unexpected> && !is_same_v<remove_cvref_t<Err>, in_place_t>&& is_constructible_v<E, Err>>>
constexpr unexpected (Err &&)
 
template<class... Args, class = enable_if_t<is_constructible_v<E, Args...>>>
constexpr unexpected (in_place_t, Args &&...)
 
template<class U , class... Args, class = enable_if_t<is_constructible_v<E, initializer_list<U>&, Args...>>>
constexpr unexpected (in_place_t, initializer_list< U >, Args &&...)
 
constexpr unexpectedoperator= (const unexpected &)=default
 
constexpr unexpectedoperator= (unexpected &&)=default
 
constexpr const E & error () const &noexcept
 
constexpr E & error () &noexcept
 
constexpr const E && error () const &&noexcept
 
constexpr E && error () &&noexcept
 
constexpr void swap (unexpected &other) noexcept(is_nothrow_swappable_v< E >)
 
template<class... Args, class >
constexpr unexpected (in_place_t, Args &&... args)
 
template<class U , class... Args, class >
constexpr unexpected (in_place_t, initializer_list< U > il, Args &&... args)
 

Friends

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

Detailed Description

template<class E>
class AZStd::unexpected< E >

Wraps the unexpected value in a type that distinguishes the unexpected value from the expected value. This avoids ambiguity when constructing an expected where value type and error type are the same i.e expected<int, int>


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