[libcxx-commits] [PATCH] D102789: [libcxx][iterator] adds `std::ranges::distance`

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 20 08:58:08 PDT 2021

Mordante added a comment.

SGTM. no real comments from me, I'll have another look after you addressed Arthur's review comments.

Comment at: libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/distance.verify.cpp:17
+namespace std::ranges {
+class forward_iterator {
cjdb wrote:
> Quuxplusone wrote:
> > I don't think you're (that is, I don't think the programmer is) allowed to add your own types to `namespace std::ranges`.
> I'm aware users aren't allowed to do this, but we're testing the standard library here. We need to ensure that ADL doesn't find something in the same namespace as the function, but there's nothing to test with (no range adaptors have been merged with main yet).
Would it make sense to add a TODO and improve this test after we have adaptors?

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list