diff options
author | Casey Carter <Casey@Carter.net> | 2017-06-06 18:47:26 +0000 |
---|---|---|
committer | Casey Carter <Casey@Carter.net> | 2017-06-06 18:47:26 +0000 |
commit | dd7c68bc7867adabc34bfe07c1a85c4cb955e088 (patch) | |
tree | 7598557a081a20f7ce35907d582210ae160c7343 /libcxx/include/optional | |
parent | 1e2b87893bf22194a4b5e55f0eb28b89cd86339f (diff) | |
download | bcm5719-llvm-dd7c68bc7867adabc34bfe07c1a85c4cb955e088.tar.gz bcm5719-llvm-dd7c68bc7867adabc34bfe07c1a85c4cb955e088.zip |
add missing constexpr to optional::value_or
[Credit to cpplearner]
Differential Revision: https://reviews.llvm.org/D27850
llvm-svn: 304813
Diffstat (limited to 'libcxx/include/optional')
-rw-r--r-- | libcxx/include/optional | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/optional b/libcxx/include/optional index 8c8ee76b141..c0fd0e7bc49 100644 --- a/libcxx/include/optional +++ b/libcxx/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"); |