Index: include/experimental/optional =================================================================== --- include/experimental/optional +++ include/experimental/optional @@ -562,7 +562,7 @@ template _LIBCPP_INLINE_VISIBILITY - value_type value_or(_Up&& __v) && + constexpr value_type value_or(_Up&& __v) && { static_assert(is_move_constructible::value, "optional::value_or: T must be move constructible"); Index: include/optional =================================================================== --- include/optional +++ include/optional @@ -893,7 +893,7 @@ template _LIBCPP_INLINE_VISIBILITY - value_type value_or(_Up&& __v) && + constexpr value_type value_or(_Up&& __v) && { static_assert(is_move_constructible_v, "optional::value_or: T must be move constructible");