Index: test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp =================================================================== --- test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp +++ test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp @@ -25,10 +25,11 @@ int main() { { - std::vector v(100); + typedef std::vector test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), input_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v)); @@ -42,10 +43,11 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), forward_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v)); @@ -59,12 +61,13 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector test_vector_type; + test_vector_type v(100); while(v.size() < v.capacity()) v.push_back(0); // force reallocation size_t sz = v.size(); int a[] = {1, 2, 3, 4, 5}; const unsigned N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), forward_iterator(a+N)); assert(v.size() == sz + N); assert(i == v.begin() + 10); @@ -77,12 +80,13 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector test_vector_type; + test_vector_type v(100); v.reserve(128); // force no reallocation size_t sz = v.size(); int a[] = {1, 2, 3, 4, 5}; const unsigned N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), forward_iterator(a+N)); assert(v.size() == sz + N); assert(i == v.begin() + 10); @@ -95,10 +99,11 @@ assert(v[j] == 0); } { - std::vector > v(100); + typedef std::vector> test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), input_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v)); @@ -112,10 +117,11 @@ assert(v[j] == 0); } { - std::vector > v(100); + typedef std::vector> test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), forward_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v)); @@ -130,10 +136,11 @@ } #if TEST_STD_VER >= 11 { - std::vector> v(100); + typedef std::vector> test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector>::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, input_iterator(a), input_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v)); @@ -147,10 +154,11 @@ assert(v[j] == 0); } { - std::vector> v(100); + typedef std::vector> test_vector_type; + test_vector_type v(100); int a[] = {1, 2, 3, 4, 5}; const int N = sizeof(a)/sizeof(a[0]); - std::vector>::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + test_vector_type::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), forward_iterator(a+N)); assert(v.size() == 100 + N); assert(is_contiguous_container_asan_correct(v));