value_or() method for std::optional compatibility Returns the contained value if present, otherwise returns the provided default
| 115 | // value_or() method for std::optional compatibility |
| 116 | // Returns the contained value if present, otherwise returns the provided default |
| 117 | T value_or(const T& default_value) const FL_NOEXCEPT { |
| 118 | return has_value() ? *ptr() : default_value; |
| 119 | } |
| 120 | |
| 121 | // value_or() overload for rvalue default values |
| 122 | T value_or(T&& default_value) const FL_NOEXCEPT { |
no test coverage detected