@@ -315,11 +315,11 @@ template <typename T> class Optional {
315
315
constexpr const T &operator *() const & { return getValue (); }
316
316
T &operator *() & { return getValue (); }
317
317
318
- template <typename U> constexpr T value_or (U &&value ) const & {
319
- return hasValue () ? getValue () : std::forward<U>(value );
318
+ template <typename U> constexpr T value_or (U &&alt ) const & {
319
+ return hasValue () ? getValue () : std::forward<U>(alt );
320
320
}
321
- template <typename U> constexpr T getValueOr (U &&value ) const & {
322
- return hasValue () ? getValue () : std::forward<U>(value );
321
+ template <typename U> constexpr T getValueOr (U &&alt ) const & {
322
+ return hasValue () ? getValue () : std::forward<U>(alt );
323
323
}
324
324
325
325
// / Apply a function to the value if present; otherwise return None.
@@ -334,11 +334,11 @@ template <typename T> class Optional {
334
334
T &&getValue() && { return std::move (Storage.getValue ()); }
335
335
T &&operator *() && { return std::move (Storage.getValue ()); }
336
336
337
- template <typename U> T value_or (U &&value ) && {
338
- return hasValue () ? std::move (getValue ()) : std::forward<U>(value );
337
+ template <typename U> T value_or (U &&alt ) && {
338
+ return hasValue () ? std::move (getValue ()) : std::forward<U>(alt );
339
339
}
340
- template <typename U> T getValueOr (U &&value ) && {
341
- return hasValue () ? std::move (getValue ()) : std::forward<U>(value );
340
+ template <typename U> T getValueOr (U &&alt ) && {
341
+ return hasValue () ? std::move (getValue ()) : std::forward<U>(alt );
342
342
}
343
343
344
344
// / Apply a function to the value if present; otherwise return None.
0 commit comments