[libcxx-commits] [PATCH] D119619: [libc++][ranges] Implement `std::sortable`.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 17 10:30:26 PST 2022
ldionne accepted this revision.
ldionne added a comment.
LGTM except for the missing coverage for projections. I don't think I need to see this again.
================
Comment at: libcxx/test/std/iterators/iterator.requirements/alg.req.sortable/sortable.compile.pass.cpp:27
+static_assert( std::indirect_strict_weak_order<CompInt, AllConstraintsSatisfied>);
+static_assert( std::sortable<AllConstraintsSatisfied, CompInt>);
+
----------------
You seem to be missing coverage for passing a projection. I think this also means you won't be able to use `int` if you want the projection to be non-trivial. You could define something like `struct Point { int x; int y; };` and have your projection be a function `Point -> int`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119619/new/
https://reviews.llvm.org/D119619
More information about the libcxx-commits
mailing list