[libcxx-commits] [libcxx] [libc++] Refactor __is_transparent_v to make it clear what it depends on (PR #186419)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 16 04:17:08 PDT 2026
================
@@ -1313,14 +1313,14 @@ public:
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI iterator find(const key_type& __k) { return __tree_.find(__k); }
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI const_iterator find(const key_type& __k) const { return __tree_.find(__k); }
# if _LIBCPP_STD_VER >= 14
- template <typename _K2,
- enable_if_t<__is_transparent_v<_Compare, _K2> || __is_transparently_comparable_v<_Compare, key_type, _K2>,
+ template <typename _K2, class _Comp = _Compare,
+ enable_if_t<__is_transparent_v<_Comp> || __is_transparently_comparable_v<_Comp, key_type, _K2>,
----------------
philnik777 wrote:
I think this should be dependent due to `__is_transparently_comparable_v`, so I don't think the extra `_Comp` is required here. IDK whether we want to simplify on that or not though.
https://github.com/llvm/llvm-project/pull/186419
More information about the libcxx-commits
mailing list