[libcxx-commits] [libcxx] [libc++] Implement comparison operators for `tuple` added in C++23 (PR #148799)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 15 09:30:47 PDT 2025


================
@@ -288,6 +291,72 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #  ifndef _LIBCPP_CXX03_LANG
 
+template <size_t _Ip>
+struct __tuple_equal {
+  template <class _Tp, class _Up>
+  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _Tp& __x, const _Up& __y) {
----------------
ldionne wrote:

I know this is pre-existing, but isn't there a more compile-time-efficient way of implementing this? Fold expressions for example?

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


More information about the libcxx-commits mailing list