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,11 +25,12 @@ int main() { { - std::vector v(100); + typedef std::vector V; + V 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), - input_iterator(a+N)); + V::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)); assert(i == v.begin() + 10); @@ -42,11 +43,12 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector V; + V 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), - forward_iterator(a+N)); + V::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)); assert(i == v.begin() + 10); @@ -59,13 +61,14 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector V; + V 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), - forward_iterator(a+N)); + V::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + forward_iterator(a+N)); assert(v.size() == sz + N); assert(i == v.begin() + 10); std::size_t j; @@ -77,13 +80,14 @@ assert(v[j] == 0); } { - std::vector v(100); + typedef std::vector V; + V 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), - forward_iterator(a+N)); + V::iterator i = v.insert(v.cbegin() + 10, forward_iterator(a), + forward_iterator(a+N)); assert(v.size() == sz + N); assert(i == v.begin() + 10); std::size_t j; @@ -95,11 +99,12 @@ assert(v[j] == 0); } { - std::vector > v(100); + typedef std::vector > V; + V 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), - input_iterator(a+N)); + V::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)); assert(i == v.begin() + 10); @@ -112,11 +117,12 @@ assert(v[j] == 0); } { - std::vector > v(100); + typedef std::vector > V; + V 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), - forward_iterator(a+N)); + V::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)); assert(i == v.begin() + 10); @@ -130,11 +136,12 @@ } #if TEST_STD_VER >= 11 { - std::vector> v(100); + typedef std::vector> V; + V 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), - input_iterator(a+N)); + V::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)); assert(i == v.begin() + 10); @@ -147,11 +154,12 @@ assert(v[j] == 0); } { - std::vector> v(100); + typedef std::vector> V; + V 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), - forward_iterator(a+N)); + V::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)); assert(i == v.begin() + 10);