add missing constexpr to optional::value_or
[Credit to cpplearner]
Differential Revision: https://reviews.llvm.org/D27850
llvm-svn: 304813
diff --git a/libcxx/include/optional b/libcxx/include/optional
index 8c8ee76..c0fd0e7 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -897,7 +897,7 @@
template <class _Up>
_LIBCPP_INLINE_VISIBILITY
- value_type value_or(_Up&& __v) &&
+ constexpr value_type value_or(_Up&& __v) &&
{
static_assert(is_move_constructible_v<value_type>,
"optional<T>::value_or: T must be move constructible");