[libcxx-commits] [PATCH] D108855: [libcxx] contiguous iterator concept: don't require pointer or complete element types

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Aug 29 10:37:53 PDT 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.fail.cpp:15
+
+#include <compare>
+#include <cstddef>
----------------
cjdb wrote:
> Quuxplusone wrote:
> > Mordante wrote:
> > > Minor nit, I would also include `<concepts>` since that's the header under test. Even when `<iterator>` is required to do so, especially since `<iterator>` is required to also include `<compare>`.
> > Yes. libc++ test style is to start with the header under test (in this case, `<concepts>`); then follow it with the other necessary standard headers (in a-z order); and then (if needed) "test_macros.h" etc.
> It's `<iterator>` that's under test. There's nothing from `<concepts>` that's directly used, so it can't be the one under test.
Ah, right, `std::contiguous_iterator` is defined in `<iterator>`, not `<concepts>`. OK.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108855/new/

https://reviews.llvm.org/D108855



More information about the libcxx-commits mailing list