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
diff --git a/libcxx/include/optional b/libcxx/include/optional
index 8c7a242..70b6eb4 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -599,8 +599,8 @@
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<