@@ -536,7 +536,7 @@ class optional {
536
536
static_assert (!std::is_array_v<U>, " U must not be an array" );
537
537
static_assert (!std::is_same_v<U, in_place_t >, " U must not be an inplace type" );
538
538
static_assert (!std::is_same_v<U, nullopt_t >, " U must not be nullopt_t" );
539
- static_assert (std::is_object_v<U> || std::is_reference_v<U>,
539
+ static_assert (std::is_object_v<U> || std::is_reference_v<U>,
540
540
" U must be either an object or a reference" ); // / References now allowed
541
541
return (has_value ()) ? optional<U>{std::invoke (std::forward<F>(f), value_)} : optional<U>{};
542
542
}
@@ -547,7 +547,7 @@ class optional {
547
547
static_assert (!std::is_array_v<U>, " U must not be an array" );
548
548
static_assert (!std::is_same_v<U, in_place_t >, " U must not be an inplace type" );
549
549
static_assert (!std::is_same_v<U, nullopt_t >, " U must not be nullopt_t type" );
550
- static_assert (std::is_object_v<U> || std::is_reference_v<U>,
550
+ static_assert (std::is_object_v<U> || std::is_reference_v<U>,
551
551
" U must be either an objecy or a reference" ); // / References now allowed
552
552
return (has_value ()) ? optional<U>{std::invoke (std::forward<F>(f), std::move (value_))} : optional<U>{};
553
553
}
0 commit comments