diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-05-17 15:30:01 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-05-17 15:30:01 +0000 |
commit | c1bcd4c1f280e40d25dada5573e1a51de69a991a (patch) | |
tree | fc904e5d37ac5e1c052d570e21175a706e6963ac /libcxx/include/optional | |
parent | 6dc120a41d01d49398a28d96a833d5f31d339146 (diff) | |
download | bcm5719-llvm-c1bcd4c1f280e40d25dada5573e1a51de69a991a.tar.gz bcm5719-llvm-c1bcd4c1f280e40d25dada5573e1a51de69a991a.zip |
Mark the copy constructor and move
constructor to be constexpr. This only works when the contained type has a constexpr copy/move ctor.
llvm-svn: 303268
Diffstat (limited to 'libcxx/include/optional')
-rw-r--r-- | libcxx/include/optional | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/optional b/libcxx/include/optional index 8c7a242113a..70b6eb44dcd 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -599,8 +599,8 @@ private: public: _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {} - _LIBCPP_INLINE_VISIBILITY optional(const optional&) = default; - _LIBCPP_INLINE_VISIBILITY optional(optional&&) = default; + _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default; + _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default; _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {} template <class... _Args, class = enable_if_t< |