|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
template<class G= E> constexpr E error_or( G&& default_value)const&; | (1) | (since C++23) |
template<class G= E> constexpr E error_or( G&& default_value)&&; | (2) | (since C++23) |
Returns the unexpected value if it exists, otherwise returnsdefault_value.
Contents |
| default_value | - | the value to use in case*this does not contain an unexpected value |
| Type requirements | ||
| This section is incomplete Reason: no example |
| returns the unexpected value (public member function)[edit] | |
| returns the expected value if present, another value otherwise (public member function)[edit] |