summaryrefslogtreecommitdiff
path: root/include/optional
diff options
context:
space:
mode:
authorCasey Carter <Casey@Carter.net>2017-06-06 18:47:26 +0000
committerCasey Carter <Casey@Carter.net>2017-06-06 18:47:26 +0000
commit57a009ae03e36eb48943d7ebcdd71fffa5df3210 (patch)
tree3d0cce268e0bbda99b35dc98150da6c41c4398d7 /include/optional
parent018fbafdf33a84a7eb4503341f62d808b8189fa1 (diff)
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
Diffstat (limited to 'include/optional')
-rw-r--r--include/optional2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/optional b/include/optional
index 8c8ee76b1..c0fd0e7bc 100644
--- a/include/optional
+++ b/include/optional
@@ -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");