[libcxx-commits] [libcxx] [libc++] Only make comparators transparent in __tree if they don't cause a conversion (PR #179453)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Feb 4 03:14:11 PST 2026
================
@@ -380,7 +380,7 @@ struct less<void> {
};
template <class _Tp>
-struct __make_transparent<less<_Tp> > {
+struct __make_transparent<_Tp, less<_Tp> > {
----------------
philnik777 wrote:
I think it's actually more confusing. You'd expect that you're supposed to put in the LHS and RHS of the comparison you want to make. However, the point of this is that we avoid a conversion in cases where we know it's fine to compare two types directly, so you _don't_ want to give it the actual LHS and RHS but only one of the two types for both arguments (they _Key in `__find_equal`).
https://github.com/llvm/llvm-project/pull/179453
More information about the libcxx-commits
mailing list