std::expected<T,E>::value
Min standard notice:
If *this contains an expected value, returns a reference to the contained value. Returns nothing for void partial specialization.
# Declarations
Primary template
constexpr T& value() &;
(since C++23)
constexpr const T& value() const&;
(since C++23)
constexpr T&& value() &&;
(since C++23)
constexpr const T&& value() const&&;
(since C++23)
void partial specialization
constexpr void value() const&;
(since C++23)
constexpr void value() &&;
(since C++23)
# Example
This section is incompleteReason: no example
# Defect reports
| DR | Applied to | Behavior as published | Correct behavior |
|---|---|---|---|
| LWG 3940 | C++23 | E was not required to be copy/move-constructible for overloads (5,6) | required |