[libcxx-commits] [libcxx] [libc++][NFC] Reduce workaround in a `in_place_t` constructor of `optional` (PR #174306)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 5 08:38:24 PST 2026


================
@@ -895,11 +896,9 @@ 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_for_optional<_Tp, _Args...>>::value, int> = 0>
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_InPlaceT, _Args&&... __args)
+  // TODO(LLVM 23): Use _v instead of ::value.
----------------
philnik777 wrote:

Why can't we do this now?

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


More information about the libcxx-commits mailing list