[libcxx-commits] [libcxx] [libc++][NFC] Remove workaround in a `in_place_t` constructor of `optional` (PR #174306)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Jan 3 19:34:12 PST 2026
================
@@ -895,11 +892,8 @@ 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)
+ template <class... _Args, enable_if_t<__is_constructible_for_optional_v<_Tp, _Args...>, int> = 0>
----------------
frederick-vs-ja wrote:
Weird. It seems that Clang 20 was still buggy, while `::value` can be used as workaround...
https://github.com/llvm/llvm-project/pull/174306
More information about the libcxx-commits
mailing list