[libcxx-commits] [PATCH] D130295: [libc++] Uses operator<=> in string_view

Kent Ross via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 7 16:16:00 PDT 2022


mumbleskates added inline comments.


================
Comment at: libcxx/test/support/test_comparisons.h:142-143
+    bool equal = order == Order::equivalent;
+    if constexpr (std::same_as<Order, std::strong_ordering>)
+        equal |= order == Order::equal;
+
----------------
For posterity, is there a strong reason this nuance was added? As I understand it, the standard mandates that `strong_ordering::equal == strong_ordering::equivalent` must hold true and the `equal` name only exists as a historical alias of the same value.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130295



More information about the libcxx-commits mailing list