[libcxx-commits] [libcxx] [libcxx] Unifying __is_trivial_equality_predicate and __is_trivial_plus_operation into __desugars_to (PR #68642)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 10 11:59:30 PDT 2023


================
@@ -41,12 +40,12 @@ struct _LIBCPP_TEMPLATE_VIS plus
 };
 _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(plus);
 
-template <class _Tp>
-struct __is_trivial_plus_operation<plus<_Tp>, _Tp, _Tp> : true_type {};
+template <class _Pred>
+struct __desugars_to<plus<_Pred>, plus<_Pred>> : true_type {};
 
 #if _LIBCPP_STD_VER >= 14
-template <class _Tp, class _Up>
-struct __is_trivial_plus_operation<plus<>, _Tp, _Up> : true_type {};
+template <>
----------------
ldionne wrote:

And this can be removed entirely since it would be handled by the other specialization I suggested in `operation_traits.h`.

This comment applies below to `std::equal_to` as well.

https://github.com/llvm/llvm-project/pull/68642


More information about the libcxx-commits mailing list