
std::expected - cppreference.com
The class template std::expected provides a way to represent either of two values: an expected value of type T, or an unexpected value of type E. expected is never valueless.
std::expected<T,E>::expected - cppreference.com
6) Constructs an object that contains an expected value, initialized as if direct-initializing (but not direct-list-initializing) an object of type T with the expression std::forward<U>(v).
std::expected<T,E>::operator= - cppreference.com
In all cases, if T is not (possibly cv-qualified) void, the destruction of old value and construction of new value is performed as if by the following exposition-only function reinit_expected.
std::expected<T,E>::~expected - cppreference.com
If has_value () is true, destroys the expected value. Otherwise, destroys the unexpected value.
std::expected<T,E>:: operator= - cppreference.com
Effects Primary template assignment operators 1,2) Assigns the state of other to *this. If has_value () and rhs.has_value() have different values (i.e. one of *this and other contains an expected value val …
Standard library header <expected> (C++23) - cppreference.com
namespace std { // class template unexpected template<class E> class unexpected; // class template bad_expected_access template<class E> class bad_expected_access; // specialization of …
std::unexpected - cppreference.com
The class template std::unexpected represents an unexpected value stored in std::expected. In particular, std::expected has constructors with std::unexpected as a single argument, which creates …
std::expected<T,E>::transform - cppreference.com
If *this contains an expected value, invokes f and returns a std::expected object that contains its result; otherwise, returns a std::expected object that contains a copy of error().
std::expected<T,E>::value - cppreference.com
If *this contains an expected value, returns a reference to the contained value. Returns nothing for void partial specialization. Otherwise, throws an exception of type …
operator== (std::expected) - cppreference.com
3) Compares std::expected object with an expected value. The objects compare equal if and only if lhs contains an expected value that is equal to val.