================ @@ -41,13 +42,12 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 boo return true; } -template < - class _Tp, - class _Up, - class _BinaryPredicate, - __enable_if_t<__is_trivial_equality_predicate<_BinaryPredicate, _Tp, _Up>::value && !is_volatile<_Tp>::value && - !is_volatile<_Up>::value && __libcpp_is_trivially_equality_comparable<_Tp, _Up>::value, - int> = 0> +template < class _Tp, + class _Up, + class _BinaryPredicate, + __enable_if_t<__desugars_to<_BinaryPredicate, equal_to<_Tp> >::value && !is_volatile<_Tp>::value && ---------------- AntonRydahl wrote:
Thanks a lot, Louis! I have tried to verify that the patch produces identical assembly for the above example compared to the main branch. Just to make sure that we are on the same page, this meant that I also had to remove ``` template <class _Tp> struct __desugars_to<equal_to<_Tp>, equal_to<void> > : true_type {}; ``` since otherwise all equality operators would be considered transparent. https://github.com/llvm/llvm-project/pull/68642 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits