value_or overloads
Declared in <util/result.h>
Returns the held value, or a fallback when the result holds an error.
template<class U>
T
value_or(U&& default_value) const &;
» more...
Returns the held value by move, or a fallback when the result holds an error.
template<class U>
T
value_or(U&& default_value) &&;
» more...
the stored value if present, otherwise default_value
| Name | Description |
|---|---|
| default_value | the value returned when no value is held |