[libcxx-commits] [PATCH] D108250: [libc++][spaceship] Implement std::tuple::operator<=>
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 8 14:01:02 PDT 2021
ldionne accepted this revision.
ldionne added a comment.
LGTM with comments, let's ship this!
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/size_incompatible_comparison.verify.cpp:15
+// bool
+// operator==(const tuple<TTypes...>& t, const tuple<UTypes...>& u);
+
----------------
This is missing a mention of `operator<`.
================
Comment at: libcxx/test/std/utilities/tuple/tuple.tuple/tuple.rel/size_incompatible_comparison.verify.cpp:22
+void f(std::tuple<int> t1, std::tuple<int, long> t2) {
+ static_cast<void>(t1 == t2); // expected-error@*:* {{}}
+ static_cast<void>(t1 < t2); // expected-error@*:* {{}}
----------------
Add a comment saying we rely on other operators being implemented in terms of those.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108250/new/
https://reviews.llvm.org/D108250
More information about the libcxx-commits
mailing list