Returns the contained value if there is one, otherwise returns u.
<beman/optional/optional.hpp>template<class U = std::remove_cv_t<T>>
requires (std::is_object_v<T> && !std::is_array_v<T>)
constexpr
std::decay_t<T>
value_or(U&& u) const;
| Name | Description |
|---|---|
| U | The type of the alternate value |
| Name | Description |
|---|---|
| u | The value to return in the empty case |