[libcxx-commits] [PATCH] D117656: [libc++] [ranges] move_sentinel and C++20 move_iterator [WIP, needs more tests]
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 26 20:56:01 PST 2022
Quuxplusone added inline comments.
================
Comment at: libcxx/include/__iterator/move_iterator.h:196
+ bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y)
+ requires __move_iter_comparable<_Iter, _Sent>
+ {
----------------
I found that writing the naïve `requires requires { __x.base() == __y.base(); }` here did //not// work; Clang complains something about accessing into incomplete type `move_iterator<X>` when you go to instantiate it. Pulling the constraint out into a concept //outside// the body of the class seems to fix the issue.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117656/new/
https://reviews.llvm.org/D117656
More information about the libcxx-commits
mailing list