The iterator types for different specializations of containers with the same element type but different allocators are not required to be convertible. This patch makes the test to take the iterator type from the same container specialization as the created container.
Diff Detail
Event Timeline
test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp | ||
---|---|---|
102–103 | Please introduce a typedef to avoid repeating std::vector<int, limited_allocator<int, 308> >. |
My intention was to be consistent with the #if TEST_STD_VER >= 11 segment of the test, which does not introduce any typedef in the similar context. Should I change both?
Ah, I missed that. Please make the change throughout. Otherwise, one can wonder whether these tests are meant to check for SCARY iterators, which they aren't.
typedef added throughout the test to avoid confusion whether the implemented test actions are meant to check for SCARY iterators.
The only ones I could find with a quick grep are:
libcxx/test/std/containers/unord/unord.multimap/scary.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/scary.pass.cpp
libcxx/test/std/containers/associative/multimap/scary.pass.cpp
libcxx/test/std/containers/associative/multiset/scary.pass.cpp
There doesn't seem to be such tests for all containers. However, I don't this SCARY iterators are actually required by the standard (am I wrong?).
test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp | ||
---|---|---|
102 | You need spaces between consecutive >>'s, otherwise the test won't pass in C++03 mode. |
test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp | ||
---|---|---|
102 | Also, we usually use names like V instead of test_vector_type, but it doesn't really matter. Just FYI. |
You are right: SCARY iterators are permitted but not required by the standard. Thanks for the tests list.
Missing space restored. Type name changed according to the coding standard (sorry, I prefer readable identifiers by default).
You need spaces between consecutive >>'s, otherwise the test won't pass in C++03 mode.