[libc++] [test] Don't assume iterators are class types.
authorArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 28 Apr 2021 01:30:38 +0000 (21:30 -0400)
committerArthur O'Dwyer <arthur.j.odwyer@gmail.com>
Wed, 28 Apr 2021 14:14:14 +0000 (10:14 -0400)
commit045781a5ce4f8022bf306e86a0ec9f860973e720
tree6e1db61d7071d51a47be47102579470b41681533
parent39866d249a21fc3c05942a1a4fbbd88acc4660bc
[libc++] [test] Don't assume iterators are class types.

In particular, `span<int>::iterator` may be a raw pointer type
and thus have no nested typedef `iterator::value_type`. However,
we already know that the value_type we expect for `span<int>` is just `int`.
Fix up all other iterator_concept_conformance tests in the same way.

Differential Revision: https://reviews.llvm.org/D101420
18 files changed:
libcxx/test/std/containers/associative/map/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/associative/multimap/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/associative/multiset/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/associative/set/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/sequences/deque/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/sequences/forwardlist/forwardlist.iter/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/sequences/list/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/sequences/vector.bool/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/sequences/vector/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/views/span.iterators/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/input.output/filesystems/class.directory_iterator/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/iter_difference_t.pass.cpp
libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/readable.traits/iter_value_t.pass.cpp
libcxx/test/std/strings/basic.string/string.iterators/iterator_concept_conformance.compile.pass.cpp