[libcxx-commits] [PATCH] D103581: [libc++][compare]Implement compare_three_way_result[_t]

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 6 03:06:56 PDT 2021


Mordante requested changes to this revision.
Mordante added a comment.
This revision now requires changes to proceed.

We recently started implementing libc++ is more granular headers. Can you adopt that style for these changes too?
You an use D103734 <https://reviews.llvm.org/D103734> as an example.
I see a lot of build failure. I did a quick look and I expect none of them are due to this patch, but to main not working properly. Can you rebase your patch to see whether it passes the build?



================
Comment at: libcxx/include/compare:485
 
+// [cmp.result], result of three-way comparison
+template<typename _Tp, typename _Up>
----------------
Please update the synopsis.


================
Comment at: libcxx/test/std/language.support/cmp/cmp.result/compare_three_way_result.pass.cpp:46
+    static_assert(std::is_same_v<std::compare_three_way_result_t<OperandType, OperandType>, SameOperandsOrdering>);
+    static_assert(std::is_same_v<std::compare_three_way_result_t<std::add_lvalue_reference_t<OperandType>, std::add_lvalue_reference_t<OperandType>>,
+                                SameOperandsOrdering>);
----------------
Please make these line fit in our maximum column width of 120 characters.


================
Comment at: libcxx/test/std/language.support/cmp/cmp.result/compare_three_way_result.pass.cpp:76
+
+int main(int, char**) {
+    do_compare_three_way_result_positive_test<std::strong_ordering, std::weak_ordering>();
----------------
I'd like to see some more tests with fundamental and library types. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103581



More information about the libcxx-commits mailing list