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
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: c1bcd4c1f280e40d25dada5573e1a51de69a991a
diff --git a/include/optional b/include/optional
index 8c7a242..70b6eb4 100644
--- a/include/optional
+++ b/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<