About 53 results
Open links in new tab
  1. 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.

  2. 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).

  3. std::expected<T,E>::~expected - cppreference.com

    If has_value () is true, destroys the expected value. Otherwise, destroys the unexpected value.

  4. std::expected<T,E>::~expected - cppreference.com

    Destroys the contained value: If has_value() is true, destroys the expected value. Otherwise, destroys the unexpected value. This destructor is trivial if std::is_trivially_destructible_v<T> and …

  5. 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 …

  6. 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.

  7. 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 …

  8. 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 …

  9. std::expected<T,E>::and_then - cppreference.com

    If *this represents an expected value, invokes f and returns its result. Otherwise, returns a std::expected object that contains an unexpected value, which is initialized with the unexpected value of *this.

  10. std::expected<T,E>::or_else - cppreference.com

    1-4) The expected value is initialized with the expected value val of *this.