[libcxx-commits] [libcxx] [libc++] Fix constraints for `optional`'s constructors taking `in_place_t` and related `make_optional` overloads (PR #173467)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 3 19:01:15 PST 2026


================
@@ -873,13 +895,16 @@ public:
   _LIBCPP_HIDE_FROM_ABI constexpr optional(optional&&)      = default;
   _LIBCPP_HIDE_FROM_ABI constexpr optional(nullopt_t) noexcept {}
 
-  template <class _InPlaceT,
-            class... _Args,
-            enable_if_t<_And<_IsSame<_InPlaceT, in_place_t>, is_constructible<_Tp, _Args...>>::value, int> = 0>
+  template <
+      class _InPlaceT,
----------------
frederick-vs-ja wrote:

Removing the workaround in #174306.

https://github.com/llvm/llvm-project/pull/173467


More information about the libcxx-commits mailing list