[libcxx-commits] [PATCH] D108855: [libcxx] contiguous iterator concept: don't require pointer or complete element types
Christopher Di Bella via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 27 21:38:12 PDT 2021
cjdb added inline comments.
================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.compile.pass.cpp:133
static_assert(std::random_access_iterator<wrong_iter_reference_t>);
-static_assert(!std::contiguous_iterator<wrong_iter_reference_t>);
----------------
jloser wrote:
> cjdb wrote:
> > This test needs to remain.
> I made this test pass by adding an `element_type` type alias to avoid the hard error in evaluating `std::to_address`. Does that work for you?
Thank you!
================
Comment at: libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.random.access/contiguous_iterator.compile.pass.cpp:167
static_assert(std::random_access_iterator<no_element_type>);
-static_assert(!std::contiguous_iterator<no_element_type>);
----------------
jloser wrote:
> cjdb wrote:
> > As does this one.
> I think this test is ill-formed due to the lack of an `element_type` type alias. This exposes a hard error when instantiating `std::to_address` partial specialization which is intended (and correct) behavior I believe.
Ack, but the test is still useful. Please move this to a verification test so we can keep it.
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