[libcxx-commits] [libcxx] [libc++] Reduce workaround in a `in_place_t` constructor of `optional` (PR #174306)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 9 23:29:30 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.
----------------
frederick-vs-ja wrote:
Oops, the bug doesn't seem completely fixed in Clang 22 if `__is_constructible_for_optional` is used.
https://github.com/llvm/llvm-project/pull/174306
More information about the libcxx-commits
mailing list