[libcxx-commits] [PATCH] D92255: [libc++] [P0202] constexpr set_union, set_difference, set_symmetric_difference, merge
Zoe Carver via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 4 11:05:44 PST 2020
zoecarver accepted this revision.
zoecarver added a comment.
I'm good with landing this now. I would kind of like to make the tests a little less complicated, but I think they're OK as-is.
================
Comment at: libcxx/test/std/algorithms/alg.sorting/sortable_helpers.h:34
+ TEST_CONSTEXPR NonTrivialSortable& operator=(const NonTrivialSortable& rhs) { value = rhs.value; return *this; }
+ friend TEST_CONSTEXPR bool operator<(const NonTrivialSortable& a, const NonTrivialSortable& b) {
+ return a.value / 10 < b.value / 10;
----------------
Super nit: I feel like it's a bit cleaner to say:
```
TEST_CONSTEXPR bool operator<(NonTrivialSortable b) {
return value / 10 < b.value / 10;
}
```
No friend; no reference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92255/new/
https://reviews.llvm.org/D92255
More information about the libcxx-commits
mailing list