[libcxx-commits] [libcxx] 35bb1f5 - [NFC][libc++][test] Removes unneeded code.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 10 10:01:00 PDT 2022
Author: Mark de Wever
Date: 2022-08-10T19:00:55+02:00
New Revision: 35bb1f5f340b1242d39646466bc2b9fafa1c60e7
URL: https://github.com/llvm/llvm-project/commit/35bb1f5f340b1242d39646466bc2b9fafa1c60e7
DIFF: https://github.com/llvm/llvm-project/commit/35bb1f5f340b1242d39646466bc2b9fafa1c60e7.diff
LOG: [NFC][libc++][test] Removes unneeded code.
In D130295 @mumbleskates wondered why `std::strong_ordering::equal` had
special code since it's the same as `std::strong_ordering::equivalent`.
This is indeed the case so the special case can be removed.
Reviewed By: mumbleskates, #libc, avogelsgesang, ldionne
Differential Revision: https://reviews.llvm.org/D131419
Added:
Modified:
libcxx/test/support/test_comparisons.h
Removed:
################################################################################
diff --git a/libcxx/test/support/test_comparisons.h b/libcxx/test/support/test_comparisons.h
index cc605778ce978..8401c920450c5 100644
--- a/libcxx/test/support/test_comparisons.h
+++ b/libcxx/test/support/test_comparisons.h
@@ -139,9 +139,6 @@ constexpr void AssertOrderReturn() {
template <class Order, class T, class U = T>
constexpr bool testOrder(const T& t1, const U& t2, Order order) {
bool equal = order == Order::equivalent;
- if constexpr (std::same_as<Order, std::strong_ordering>)
- equal |= order == Order::equal;
-
bool less = order == Order::less;
return (t1 <=> t2 == order) && testComparisons(t1, t2, equal, less);
More information about the libcxx-commits
mailing list