[libcxx-commits] [PATCH] D144262: [libc++][ranges] Implement LWG-3865 Sorting a range of pairs

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Feb 18 06:59:32 PST 2023


Mordante added subscribers: strega-nil, ldionne, Mordante.
Mordante added a comment.

Thanks for your patch! I haven't looked in detail, since I first like to agree to which language versions we want to backport this fix.



================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp:68
-    return lhs.first == rhs.first && lhs.second == rhs.second;
-}
-
----------------
We typically back-port LWG issues to older language versions.
However I'm a bit wary of retroactively applying this LWG issue, since it may affect existing code.
Looking at MSVC STL it seems @strega-nil has the same concerns.
https://github.com/microsoft/STL/pull/3476/files/4f2ec495a6b5e6ab61d504663b0ad7d3db9db547#r1110452521

Since `operator==` and `operator<=>` are added/changed in C++20, I feel less wary to change it there.
Doing this back to C++03 feels a bit scary.

@ldionne What's your opinion?




================
Comment at: libcxx/test/std/utilities/utility/pairs/pairs.spec/comparison.pass.cpp:11
 
 // template <class T1, class T2> struct pair
 
----------------
Can you also update `libcxx/test/std/utilities/utility/pairs/pairs.spec/three_way_comparison.pass.cpp`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144262/new/

https://reviews.llvm.org/D144262



More information about the libcxx-commits mailing list