[libcxx-commits] [PATCH] D130295: [libc++] Uses operator<=> in string_view
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 8 10:59:27 PDT 2022
Mordante marked an inline comment as done.
Mordante 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;
+
----------------
Mordante wrote:
> mumbleskates wrote:
> > 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.
> Yes since I missed that detail in the Standard ;-) I had a look and they are indeed the same, thanks for asking the question! I'll make a patch to simplify this.
Fixed in D131419.
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