[libcxx-commits] [libcxx] [libc++] Make `flat_(multi)map`'s iterators require `operator<=>` (PR #131290)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 17 11:02:17 PDT 2025


================
@@ -139,9 +141,12 @@ struct __key_value_iterator {
     return !(__x < __y);
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend auto operator<=>(const __key_value_iterator& __x, const __key_value_iterator& __y)
-    requires three_way_comparable<__key_iterator>
-  {
+  _LIBCPP_HIDE_FROM_ABI friend strong_ordering
+  operator<=>(const __key_value_iterator& __x, const __key_value_iterator& __y) {
----------------
mordante wrote:

This changes https://eel.is/c++draft/container.reqmts#40 from a `Constraint` to a `Mandates`.
Am I misunderstanding something?

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


More information about the libcxx-commits mailing list