add missing constexpr to optional::value_or

[Credit to cpplearner]

Differential Revision: https://reviews.llvm.org/D27850

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Casey Carter
2017-06-06 18:47:26 +00:00
parent 018fbafdf3
commit 57a009ae03
2 changed files with 14 additions and 8 deletions

View File

@@ -897,7 +897,7 @@ public:
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");