diff --git a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp @@ -41,7 +41,7 @@ {3, 2} }; assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -65,7 +65,7 @@ {3, 2} }; assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy.pass.cpp @@ -43,7 +43,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -51,7 +51,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -78,7 +78,7 @@ assert(m.get_allocator() == A(-2)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -86,7 +86,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -112,7 +112,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -120,7 +120,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_alloc.pass.cpp @@ -43,7 +43,7 @@ assert(m.get_allocator() == A(3)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -51,7 +51,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -78,7 +78,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -86,7 +86,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -112,7 +112,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -120,7 +120,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp @@ -138,7 +138,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -146,7 +146,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -188,7 +188,7 @@ assert(m.get_allocator() == A(2)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -196,7 +196,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -224,7 +224,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -232,7 +232,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -259,7 +259,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -267,7 +267,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -295,14 +295,14 @@ m = mo; assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); @@ -329,14 +329,14 @@ m = mo; assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == V(1, 1)); assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list.pass.cpp @@ -37,7 +37,7 @@ {3, 2} }; assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -57,7 +57,7 @@ {3, 2} }; assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare.pass.cpp @@ -37,7 +37,7 @@ {3, 2} }, C(3)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -58,7 +58,7 @@ {3, 2} }, C(3)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/initializer_list_compare_alloc.pass.cpp @@ -39,7 +39,7 @@ {3, 2} }, C(3), A(6)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -62,7 +62,7 @@ {3, 2} }, C(3), A()); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -87,7 +87,7 @@ }, a); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -110,7 +110,7 @@ {3, 2} }, C(3), a); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter.pass.cpp @@ -37,7 +37,7 @@ }; std::map m(ar, ar+sizeof(ar)/sizeof(ar[0])); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -59,7 +59,7 @@ }; std::map, min_allocator>> m(ar, ar+sizeof(ar)/sizeof(ar[0])); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp.pass.cpp @@ -40,7 +40,7 @@ std::map m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -64,7 +64,7 @@ std::map>> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/iter_iter_comp_alloc.pass.cpp @@ -44,7 +44,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -70,7 +70,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -97,7 +97,7 @@ std::map m(ar, ar+sizeof(ar)/sizeof(ar[0]), a ); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -110,7 +110,7 @@ std::map m(ar, ar+sizeof(ar)/sizeof(ar[0]), a ); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/move.pass.cpp @@ -33,12 +33,12 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { V ar[] = @@ -60,7 +60,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -68,7 +68,7 @@ assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef test_less C; @@ -78,12 +78,12 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { V ar[] = @@ -105,7 +105,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -113,7 +113,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } return 0; diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_initializer_list.pass.cpp @@ -39,7 +39,7 @@ {2, 2}, }); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); @@ -61,7 +61,7 @@ {2, 2}, }); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin(), 2) == V(3, 1)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/assign_initializer_list.pass.cpp @@ -39,7 +39,7 @@ {3, 2} }; assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -68,7 +68,7 @@ {3, 2} }; assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list.pass.cpp @@ -38,7 +38,7 @@ {3, 2} }; assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -66,7 +66,7 @@ {3, 2} }; assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare.pass.cpp @@ -41,7 +41,7 @@ Cmp(4) ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -73,7 +73,7 @@ Cmp(4) ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/initializer_list_compare_alloc.pass.cpp @@ -43,7 +43,7 @@ Cmp(4), A(5) ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -77,7 +77,7 @@ Cmp(4), A() ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -109,7 +109,7 @@ }, a); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); M::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); @@ -142,7 +142,7 @@ Cmp(4), A{} ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 1.5)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter.pass.cpp @@ -37,7 +37,7 @@ }; std::multimap m(ar, ar+sizeof(ar)/sizeof(ar[0])); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -65,7 +65,7 @@ }; std::multimap, min_allocator> m(ar, ar+sizeof(ar)/sizeof(ar[0])); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -95,7 +95,7 @@ A a; std::multimap, A> m(ar, ar+sizeof(ar)/sizeof(ar[0]), a); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp.pass.cpp @@ -41,7 +41,7 @@ std::multimap m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -71,7 +71,7 @@ std::multimap> m(ar, ar+sizeof(ar)/sizeof(ar[0]), C(5)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/iter_iter_comp_alloc.pass.cpp @@ -44,7 +44,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -76,7 +76,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -107,7 +107,7 @@ assert(m.get_allocator() == A{}); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move.pass.cpp @@ -33,12 +33,12 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { V ar[] = @@ -60,7 +60,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -74,7 +74,7 @@ assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef test_less C; @@ -84,12 +84,12 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { V ar[] = @@ -111,7 +111,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*m.begin() == V(1, 1)); assert(*next(m.begin()) == V(1, 1.5)); assert(*next(m.begin(), 2) == V(1, 2)); @@ -125,7 +125,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } return 0; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.modifiers/insert_initializer_list.pass.cpp @@ -42,7 +42,7 @@ } ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 2)); @@ -74,7 +74,7 @@ } ); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); C::const_iterator i = m.cbegin(); assert(*i == V(1, 1)); assert(*++i == V(1, 2)); diff --git a/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/insert_initializer_list.pass.cpp @@ -29,7 +29,7 @@ C m = {10, 8}; m.insert({1, 2, 3, 4, 5, 6}); assert(m.size() == 8); - assert(static_cast(distance(m.begin(), m.end())) == m.size()); + assert(static_cast(std::distance(m.begin(), m.end())) == m.size()); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -46,7 +46,7 @@ C m = {10, 8}; m.insert({1, 2, 3, 4, 5, 6}); assert(m.size() == 8); - assert(static_cast(distance(m.begin(), m.end())) == m.size()); + assert(static_cast(std::distance(m.begin(), m.end())) == m.size()); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/assign_initializer_list.pass.cpp @@ -28,7 +28,7 @@ C m = {10, 8}; m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -43,7 +43,7 @@ C m = {10, 8}; m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp @@ -42,7 +42,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -56,7 +56,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 9); - assert(distance(mo.begin(), mo.end()) == 9); + assert(std::distance(mo.begin(), mo.end()) == 9); assert(*next(mo.begin(), 0) == 1); assert(*next(mo.begin(), 1) == 1); assert(*next(mo.begin(), 2) == 1); @@ -89,7 +89,7 @@ assert(m.get_allocator() == A(-2)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -103,7 +103,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 9); - assert(distance(mo.begin(), mo.end()) == 9); + assert(std::distance(mo.begin(), mo.end()) == 9); assert(*next(mo.begin(), 0) == 1); assert(*next(mo.begin(), 1) == 1); assert(*next(mo.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp @@ -41,7 +41,7 @@ assert(m.get_allocator() == A(3)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -55,7 +55,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 9); - assert(distance(mo.begin(), mo.end()) == 9); + assert(std::distance(mo.begin(), mo.end()) == 9); assert(*next(mo.begin(), 0) == 1); assert(*next(mo.begin(), 1) == 1); assert(*next(mo.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp @@ -43,7 +43,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -57,7 +57,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 9); - assert(distance(mo.begin(), mo.end()) == 9); + assert(std::distance(mo.begin(), mo.end()) == 9); assert(*next(mo.begin(), 0) == 1); assert(*next(mo.begin(), 1) == 1); assert(*next(mo.begin(), 2) == 1); @@ -110,7 +110,7 @@ assert(m.get_allocator() == A(2)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -124,7 +124,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 9); - assert(distance(mo.begin(), mo.end()) == 9); + assert(std::distance(mo.begin(), mo.end()) == 9); assert(*next(mo.begin(), 0) == 1); assert(*next(mo.begin(), 1) == 1); assert(*next(mo.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list.pass.cpp @@ -27,7 +27,7 @@ typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -41,7 +41,7 @@ typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -56,7 +56,7 @@ min_allocator a; C m ({1, 2, 3, 4, 5, 6}, a); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp @@ -26,7 +26,7 @@ typedef C::value_type V; C m({1, 2, 3, 4, 5, 6}, Cmp(10)); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp @@ -28,7 +28,7 @@ typedef C::value_type V; C m({1, 2, 3, 4, 5, 6}, Cmp(10), A(4)); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter.pass.cpp @@ -39,7 +39,7 @@ std::multiset m(cpp17_input_iterator(ar), cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0]))); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -68,7 +68,7 @@ std::multiset, min_allocator> m(cpp17_input_iterator(ar), cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0]))); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_alloc.pass.cpp @@ -46,7 +46,7 @@ assert(m.value_comp() == C(5)); assert(m.get_allocator() == A(7)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -78,7 +78,7 @@ std::multiset m(ar, ar+sizeof(ar)/sizeof(ar[0]), a); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/iter_iter_comp.pass.cpp @@ -40,7 +40,7 @@ cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0])), C(5)); assert(m.value_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp --- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move.pass.cpp @@ -33,12 +33,12 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef int V; @@ -61,7 +61,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -75,7 +75,7 @@ assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef int V; @@ -98,7 +98,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 9); - assert(distance(m.begin(), m.end()) == 9); + assert(std::distance(m.begin(), m.end()) == 9); assert(*next(m.begin(), 0) == 1); assert(*next(m.begin(), 1) == 1); assert(*next(m.begin(), 2) == 1); @@ -112,7 +112,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } return 0; diff --git a/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/insert_initializer_list.pass.cpp @@ -29,7 +29,7 @@ C m = {10, 8}; m.insert({1, 2, 3, 4, 5, 6}); assert(m.size() == 8); - assert(static_cast(distance(m.begin(), m.end())) == m.size()); + assert(static_cast(std::distance(m.begin(), m.end())) == m.size()); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -46,7 +46,7 @@ C m = {10, 8}; m.insert({1, 2, 3, 4, 5, 6}); assert(m.size() == 8); - assert(static_cast(distance(m.begin(), m.end())) == m.size()); + assert(static_cast(std::distance(m.begin(), m.end())) == m.size()); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp @@ -28,7 +28,7 @@ C m = {10, 8}; m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -43,7 +43,7 @@ C m = {10, 8}; m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp @@ -42,7 +42,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -50,7 +50,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); @@ -77,7 +77,7 @@ assert(m.get_allocator() == A(-2)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -85,7 +85,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp @@ -41,7 +41,7 @@ assert(m.get_allocator() == A(3)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -49,7 +49,7 @@ assert(mo.get_allocator() == A(7)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp @@ -43,7 +43,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -51,7 +51,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); @@ -93,7 +93,7 @@ assert(m.get_allocator() == A(2)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -101,7 +101,7 @@ assert(mo.get_allocator() == A(2)); assert(mo.key_comp() == C(5)); assert(mo.size() == 3); - assert(distance(mo.begin(), mo.end()) == 3); + assert(std::distance(mo.begin(), mo.end()) == 3); assert(*mo.begin() == 1); assert(*next(mo.begin()) == 2); assert(*next(mo.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list.pass.cpp @@ -27,7 +27,7 @@ typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -41,7 +41,7 @@ typedef C::value_type V; C m = {1, 2, 3, 4, 5, 6}; assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp @@ -26,7 +26,7 @@ typedef C::value_type V; C m({1, 2, 3, 4, 5, 6}, Cmp(10)); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp @@ -30,7 +30,7 @@ typedef C::value_type V; C m({1, 2, 3, 4, 5, 6}, Cmp(10), A(4)); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); @@ -48,7 +48,7 @@ typedef C::value_type V; C m({1, 2, 3, 4, 5, 6}, A(4)); assert(m.size() == 6); - assert(distance(m.begin(), m.end()) == 6); + assert(std::distance(m.begin(), m.end()) == 6); C::const_iterator i = m.cbegin(); assert(*i == V(1)); assert(*++i == V(2)); diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter.pass.cpp @@ -39,7 +39,7 @@ std::set m(cpp17_input_iterator(ar), cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0]))); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -62,7 +62,7 @@ std::set, min_allocator> m(cpp17_input_iterator(ar), cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0]))); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_alloc.pass.cpp @@ -50,7 +50,7 @@ assert(m.value_comp() == C(5)); assert(m.get_allocator() == A(7)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -76,7 +76,7 @@ std::set m(ar, ar+sizeof(ar)/sizeof(ar[0]), a); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/iter_iter_comp.pass.cpp @@ -40,7 +40,7 @@ cpp17_input_iterator(ar+sizeof(ar)/sizeof(ar[0])), C(5)); assert(m.value_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); diff --git a/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp --- a/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.cons/move.pass.cpp @@ -33,12 +33,12 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 0); - assert(distance(m.begin(), m.end()) == 0); + assert(std::distance(m.begin(), m.end()) == 0); assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef int V; @@ -61,7 +61,7 @@ assert(m.get_allocator() == A(7)); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -69,7 +69,7 @@ assert(mo.get_allocator() == A(test_alloc_base::moved_value)); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } { typedef int V; @@ -92,7 +92,7 @@ assert(m.get_allocator() == A()); assert(m.key_comp() == C(5)); assert(m.size() == 3); - assert(distance(m.begin(), m.end()) == 3); + assert(std::distance(m.begin(), m.end()) == 3); assert(*m.begin() == 1); assert(*next(m.begin()) == 2); assert(*next(m.begin(), 2) == 3); @@ -100,7 +100,7 @@ assert(mo.get_allocator() == A()); assert(mo.key_comp() == C(5)); assert(mo.size() == 0); - assert(distance(mo.begin(), mo.end()) == 0); + assert(std::distance(mo.begin(), mo.end()) == 0); } return 0; diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size.pass.cpp @@ -49,7 +49,7 @@ typename C::size_type c1_osize = c1.size(); c1.resize(size); assert(c1.size() == static_cast(size)); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); CI i = c1.begin(); for (int j = 0; static_cast(j) < std::min(c1_osize, c1.size()); ++j, ++i) assert(*i == j); diff --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/resize_size_value.pass.cpp @@ -49,7 +49,7 @@ typename C::size_type c1_osize = c1.size(); c1.resize(size, x); assert(c1.size() == static_cast(size)); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); CI i = c1.begin(); for (int j = 0; static_cast(j) < std::min(c1_osize, c1.size()); ++j, ++i) assert(*i == j); diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_iter_iter.pass.cpp @@ -49,7 +49,7 @@ test(C& c1, const C& c2) { c1.assign(c2.begin(), c2.end()); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); assert(c1 == c2); } @@ -69,7 +69,7 @@ typedef typename C::const_iterator CI; typedef cpp17_input_iterator ICI; c1.assign(ICI(c2.begin()), ICI(c2.end())); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); assert(c1 == c2); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/assign_size_value.pass.cpp @@ -47,7 +47,7 @@ typedef typename C::const_iterator CI; c1.assign(size, v); assert(c1.size() == static_cast(size)); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); for (CI i = c1.begin(); i != c1.end(); ++i) assert(*i == v); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter.pass.cpp @@ -32,7 +32,7 @@ typedef typename C::const_iterator const_iterator; C d(f, l); assert(d.size() == static_cast(std::distance(f, l))); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i, ++f) assert(*i == *f); } @@ -46,7 +46,7 @@ typedef typename C::const_iterator const_iterator; C d(f, l); assert(d.size() == static_cast(std::distance(f, l))); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i, ++f) assert(*i == *f); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/iter_iter_alloc.pass.cpp @@ -33,7 +33,7 @@ C d(f, l, a); assert(d.get_allocator() == a); assert(d.size() == static_cast(std::distance(f, l))); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i, ++f) assert(*i == *f); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp @@ -31,7 +31,7 @@ C d(n, Allocator()); assert(static_cast(DefaultOnly::count) == n); assert(d.size() == n); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == T()); } @@ -52,7 +52,7 @@ C d(n); assert(static_cast(DefaultOnly::count) == n); assert(d.size() == n); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); #if TEST_STD_VER >= 11 for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == T()); diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp @@ -26,7 +26,7 @@ typedef typename C::const_iterator const_iterator; C d(n, x); assert(d.size() == n); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == x); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value_alloc.pass.cpp @@ -26,7 +26,7 @@ C d(n, x, a); assert(d.get_allocator() == a); assert(d.size() == n); - assert(static_cast(distance(d.begin(), d.end())) == d.size()); + assert(static_cast(std::distance(d.begin(), d.end())) == d.size()); for (const_iterator i = d.begin(), e = d.end(); i != e; ++i) assert(*i == x); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp @@ -25,7 +25,7 @@ C c; ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -35,10 +35,10 @@ ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -47,7 +47,7 @@ C c; ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -57,10 +57,10 @@ ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace.pass.cpp @@ -52,7 +52,7 @@ CI i = c1.emplace(c1.begin() + P, Emplaceable(1, 2.5)); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); assert(*i == Emplaceable(1, 2.5)); } diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_back.pass.cpp @@ -57,7 +57,7 @@ c1.emplace_back(Emplaceable(1, 2.5)); #endif assert(c1.size() == c1_osize + 1); - assert(distance(c1.begin(), c1.end()) + assert(std::distance(c1.begin(), c1.end()) == static_cast(c1.size())); I i = c1.end(); assert(*--i == Emplaceable(1, 2.5)); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/emplace_front.pass.cpp @@ -57,7 +57,7 @@ c1.emplace_front(Emplaceable(1, 2.5)); #endif assert(c1.size() == c1_osize + 1); - assert(distance(c1.begin(), c1.end()) + assert(std::distance(c1.begin(), c1.end()) == static_cast(c1.size())); I i = c1.begin(); assert(*i == Emplaceable(1, 2.5)); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp @@ -67,7 +67,7 @@ I i = c1.erase(c1.cbegin() + P); assert(i == c1.begin() + P); assert(c1.size() == c1_osize - 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); int j = 0; for (; j < P; ++j, ++i) diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp @@ -70,7 +70,7 @@ I i = c1.erase(c1.cbegin() + P, c1.cbegin() + (P + size)); assert(i == c1.begin() + P); assert(c1.size() == c1_osize - size); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); int j = 0; for (; j < P; ++j, ++i) diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp @@ -57,7 +57,7 @@ CI i = c1.insert(c1.begin() + P, BCI(c2.begin()), BCI(c2.end())); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + c2.size()); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); @@ -74,7 +74,7 @@ CI i = c1.insert(c1.begin() + P, BCI(c2.begin()), BCI(c2.end())); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + c2.size()); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); @@ -91,7 +91,7 @@ CI i = c1.insert(c1.begin() + P, BCI(c2.begin()), BCI(c2.end())); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + c2.size()); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); @@ -172,7 +172,7 @@ CI i = c1.insert(c1.begin() + P, ICI(c2.begin()), ICI(c2.end())); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + c2.size()); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_rvalue.pass.cpp @@ -52,7 +52,7 @@ CI i = c1.insert(c1.begin() + P, MoveOnly(x)); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, (void) ++i) assert(*i == MoveOnly(j)); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_size_value.pass.cpp @@ -50,7 +50,7 @@ CI i = c1.insert(c1.begin() + P, size, x); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + size); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); @@ -120,7 +120,7 @@ CI jt = c.cbegin() + j; c.insert(it, 5, *jt); assert(c.size() == 25); - assert(static_cast(distance(c.begin(), c.end())) == c.size()); + assert(static_cast(std::distance(c.begin(), c.end())) == c.size()); it = c.cbegin(); for (int k = 0; k < i; ++k, ++it) assert(*it == k); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_value.pass.cpp @@ -48,7 +48,7 @@ CI i = c1.insert(c1.begin() + P, x); assert(i == c1.begin() + P); assert(c1.size() == c1_osize + 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); i = c1.begin(); for (int j = 0; j < P; ++j, ++i) assert(*i == j); @@ -102,7 +102,7 @@ CI jt = c.cbegin() + j; c.insert(it, *jt); assert(c.size() == 21); - assert(static_cast(distance(c.begin(), c.end())) == c.size()); + assert(static_cast(std::distance(c.begin(), c.end())) == c.size()); it = c.cbegin(); for (int k = 0; k < i; ++k, ++it) assert(*it == k); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_back.pass.cpp @@ -47,7 +47,7 @@ std::size_t c1_osize = c1.size(); c1.pop_back(); assert(c1.size() == c1_osize - 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); I i = c1.begin(); for (int j = 0; static_cast(j) < c1.size(); ++j, ++i) assert(*i == j); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/pop_front.pass.cpp @@ -47,7 +47,7 @@ std::size_t c1_osize = c1.size(); c1.pop_front(); assert(c1.size() == c1_osize - 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); I i = c1.begin(); for (int j = 1; static_cast(j) < c1.size(); ++j, ++i) assert(*i == j); diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front.pass.cpp @@ -47,7 +47,7 @@ std::size_t c1_osize = c1.size(); c1.push_front(x); assert(c1.size() == c1_osize + 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); I i = c1.begin(); assert(*i == x); ++i; diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_rvalue.pass.cpp @@ -51,7 +51,7 @@ std::size_t c1_osize = c1.size(); c1.push_front(MoveOnly(x)); assert(c1.size() == c1_osize + 1); - assert(static_cast(distance(c1.begin(), c1.end())) == c1.size()); + assert(static_cast(std::distance(c1.begin(), c1.end())) == c1.size()); I i = c1.begin(); assert(*i == MoveOnly(x)); ++i; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp @@ -25,7 +25,7 @@ C c; ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -35,10 +35,10 @@ ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -47,7 +47,7 @@ C c; ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -57,10 +57,10 @@ ASSERT_NOEXCEPT(c.clear()); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.clear(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_after.pass.cpp @@ -30,20 +30,20 @@ I i = c.emplace_after(c.cbefore_begin()); assert(i == c.begin()); assert(c.front() == Emplaceable()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.emplace_after(c.cbegin(), 1, 2.5); assert(i == next(c.begin())); assert(c.front() == Emplaceable()); assert(*next(c.begin()) == Emplaceable(1, 2.5)); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.emplace_after(next(c.cbegin()), 2, 3.5); assert(i == next(c.begin(), 2)); assert(c.front() == Emplaceable()); assert(*next(c.begin()) == Emplaceable(1, 2.5)); assert(*next(c.begin(), 2) == Emplaceable(2, 3.5)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.emplace_after(c.cbegin(), 3, 4.5); assert(i == next(c.begin())); @@ -51,7 +51,7 @@ assert(*next(c.begin(), 1) == Emplaceable(3, 4.5)); assert(*next(c.begin(), 2) == Emplaceable(1, 2.5)); assert(*next(c.begin(), 3) == Emplaceable(2, 3.5)); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } { typedef Emplaceable T; @@ -61,20 +61,20 @@ I i = c.emplace_after(c.cbefore_begin()); assert(i == c.begin()); assert(c.front() == Emplaceable()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.emplace_after(c.cbegin(), 1, 2.5); assert(i == next(c.begin())); assert(c.front() == Emplaceable()); assert(*next(c.begin()) == Emplaceable(1, 2.5)); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.emplace_after(next(c.cbegin()), 2, 3.5); assert(i == next(c.begin(), 2)); assert(c.front() == Emplaceable()); assert(*next(c.begin()) == Emplaceable(1, 2.5)); assert(*next(c.begin(), 2) == Emplaceable(2, 3.5)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.emplace_after(c.cbegin(), 3, 4.5); assert(i == next(c.begin())); @@ -82,7 +82,7 @@ assert(*next(c.begin(), 1) == Emplaceable(3, 4.5)); assert(*next(c.begin(), 2) == Emplaceable(1, 2.5)); assert(*next(c.begin(), 3) == Emplaceable(2, 3.5)); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } return 0; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/emplace_front.pass.cpp @@ -31,19 +31,19 @@ T& r1 = c.emplace_front(); assert(c.front() == Emplaceable()); assert(&r1 == &c.front()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); T& r2 = c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); assert(&r2 == &c.front()); #else c.emplace_front(); assert(c.front() == Emplaceable()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); #endif assert(*next(c.begin()) == Emplaceable()); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } { typedef Emplaceable T; @@ -53,19 +53,19 @@ T& r1 = c.emplace_front(); assert(c.front() == Emplaceable()); assert(&r1 == &c.front()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); T& r2 = c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); assert(&r2 == &c.front()); #else c.emplace_front(); assert(c.front() == Emplaceable()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.emplace_front(1, 2.5); assert(c.front() == Emplaceable(1, 2.5)); #endif assert(*next(c.begin()) == Emplaceable()); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } return 0; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_many.pass.cpp @@ -26,7 +26,7 @@ C::iterator i = c.erase_after(next(c.cbefore_begin(), 4), next(c.cbefore_begin(), 4)); assert(i == next(c.cbefore_begin(), 4)); - assert(distance(c.begin(), c.end()) == 10); + assert(std::distance(c.begin(), c.end()) == 10); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -40,7 +40,7 @@ i = c.erase_after(next(c.cbefore_begin(), 2), next(c.cbefore_begin(), 5)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 8); + assert(std::distance(c.begin(), c.end()) == 8); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -52,7 +52,7 @@ i = c.erase_after(next(c.cbefore_begin(), 2), next(c.cbefore_begin(), 3)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 8); + assert(std::distance(c.begin(), c.end()) == 8); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -64,7 +64,7 @@ i = c.erase_after(next(c.cbefore_begin(), 5), next(c.cbefore_begin(), 9)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -73,7 +73,7 @@ i = c.erase_after(next(c.cbefore_begin(), 0), next(c.cbefore_begin(), 2)); assert(i == c.begin()); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 4); assert(*next(c.begin(), 2) == 5); @@ -82,7 +82,7 @@ i = c.erase_after(next(c.cbefore_begin(), 0), next(c.cbefore_begin(), 5)); assert(i == c.begin()); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -93,7 +93,7 @@ C::iterator i = c.erase_after(next(c.cbefore_begin(), 4), next(c.cbefore_begin(), 4)); assert(i == next(c.cbefore_begin(), 4)); - assert(distance(c.begin(), c.end()) == 10); + assert(std::distance(c.begin(), c.end()) == 10); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -107,7 +107,7 @@ i = c.erase_after(next(c.cbefore_begin(), 2), next(c.cbefore_begin(), 5)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 8); + assert(std::distance(c.begin(), c.end()) == 8); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -119,7 +119,7 @@ i = c.erase_after(next(c.cbefore_begin(), 2), next(c.cbefore_begin(), 3)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 8); + assert(std::distance(c.begin(), c.end()) == 8); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -131,7 +131,7 @@ i = c.erase_after(next(c.cbefore_begin(), 5), next(c.cbefore_begin(), 9)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 4); @@ -140,7 +140,7 @@ i = c.erase_after(next(c.cbefore_begin(), 0), next(c.cbefore_begin(), 2)); assert(i == c.begin()); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 4); assert(*next(c.begin(), 2) == 5); @@ -149,7 +149,7 @@ i = c.erase_after(next(c.cbefore_begin(), 0), next(c.cbefore_begin(), 5)); assert(i == c.begin()); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/erase_after_one.pass.cpp @@ -26,7 +26,7 @@ C::iterator i = c.erase_after(next(c.cbefore_begin(), 4)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -34,26 +34,26 @@ i = c.erase_after(next(c.cbefore_begin(), 0)); assert(i == c.begin()); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 2); assert(*next(c.begin(), 2) == 3); i = c.erase_after(next(c.cbefore_begin(), 1)); assert(i == next(c.begin())); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 3); i = c.erase_after(next(c.cbefore_begin(), 1)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(*next(c.begin(), 0) == 1); i = c.erase_after(next(c.cbefore_begin(), 0)); assert(i == c.begin()); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -64,7 +64,7 @@ C::iterator i = c.erase_after(next(c.cbefore_begin(), 4)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -72,26 +72,26 @@ i = c.erase_after(next(c.cbefore_begin(), 0)); assert(i == c.begin()); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 2); assert(*next(c.begin(), 2) == 3); i = c.erase_after(next(c.cbefore_begin(), 1)); assert(i == next(c.begin())); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); assert(*next(c.begin(), 0) == 1); assert(*next(c.begin(), 1) == 3); i = c.erase_after(next(c.cbefore_begin(), 1)); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(*next(c.begin(), 0) == 1); i = c.erase_after(next(c.cbefore_begin(), 0)); assert(i == c.begin()); assert(i == c.end()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_const.pass.cpp @@ -27,20 +27,20 @@ assert(i == c.begin()); assert(c.front() == 0); assert(c.front() == 0); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.insert_after(c.cbegin(), 1); assert(i == next(c.begin())); assert(c.front() == 0); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.insert_after(next(c.cbegin()), 2); assert(i == next(c.begin(), 2)); assert(c.front() == 0); assert(*next(c.begin()) == 1); assert(*next(c.begin(), 2) == 2); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.insert_after(c.cbegin(), 3); assert(i == next(c.begin())); @@ -48,7 +48,7 @@ assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 1); assert(*next(c.begin(), 3) == 2); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } #if TEST_STD_VER >= 11 { @@ -60,20 +60,20 @@ assert(i == c.begin()); assert(c.front() == 0); assert(c.front() == 0); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.insert_after(c.cbegin(), 1); assert(i == next(c.begin())); assert(c.front() == 0); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.insert_after(next(c.cbegin()), 2); assert(i == next(c.begin(), 2)); assert(c.front() == 0); assert(*next(c.begin()) == 1); assert(*next(c.begin(), 2) == 2); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.insert_after(c.cbegin(), 3); assert(i == next(c.begin())); @@ -81,7 +81,7 @@ assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 1); assert(*next(c.begin(), 3) == 2); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_init.pass.cpp @@ -27,18 +27,18 @@ C c; I i = c.insert_after(c.cbefore_begin(), {}); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), {0, 1, 2}); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); i = c.insert_after(c.begin(), {3, 4}); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 4); @@ -52,18 +52,18 @@ C c; I i = c.insert_after(c.cbefore_begin(), {}); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), {0, 1, 2}); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); i = c.insert_after(c.begin(), {3, 4}); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 4); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_range.pass.cpp @@ -30,18 +30,18 @@ const T t[] = {0, 1, 2, 3, 4}; I i = c.insert_after(c.cbefore_begin(), J(t), J(t)); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), J(t), J(t+3)); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); i = c.insert_after(c.begin(), J(t+3), J(t+5)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 4); @@ -58,18 +58,18 @@ const T t[] = {0, 1, 2, 3, 4}; I i = c.insert_after(c.cbefore_begin(), J(t), J(t)); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), J(t), J(t+3)); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); i = c.insert_after(c.begin(), J(t+3), J(t+5)); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 4); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_rv.pass.cpp @@ -30,20 +30,20 @@ assert(i == c.begin()); assert(c.front() == 0); assert(c.front() == 0); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.insert_after(c.cbegin(), 1); assert(i == next(c.begin())); assert(c.front() == 0); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.insert_after(next(c.cbegin()), 2); assert(i == next(c.begin(), 2)); assert(c.front() == 0); assert(*next(c.begin()) == 1); assert(*next(c.begin(), 2) == 2); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.insert_after(c.cbegin(), 3); assert(i == next(c.begin())); @@ -51,7 +51,7 @@ assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 1); assert(*next(c.begin(), 3) == 2); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } { typedef MoveOnly T; @@ -62,20 +62,20 @@ assert(i == c.begin()); assert(c.front() == 0); assert(c.front() == 0); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); i = c.insert_after(c.cbegin(), 1); assert(i == next(c.begin())); assert(c.front() == 0); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); i = c.insert_after(next(c.cbegin()), 2); assert(i == next(c.begin(), 2)); assert(c.front() == 0); assert(*next(c.begin()) == 1); assert(*next(c.begin(), 2) == 2); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); i = c.insert_after(c.cbegin(), 3); assert(i == next(c.begin())); @@ -83,7 +83,7 @@ assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 1); assert(*next(c.begin(), 3) == 2); - assert(distance(c.begin(), c.end()) == 4); + assert(std::distance(c.begin(), c.end()) == 4); } return 0; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp @@ -25,18 +25,18 @@ C c; I i = c.insert_after(c.cbefore_begin(), 0, 0); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), 3, 3); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 3); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 3); i = c.insert_after(c.begin(), 2, 2); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 3); assert(*next(c.begin(), 1) == 2); assert(*next(c.begin(), 2) == 2); @@ -51,18 +51,18 @@ C c; I i = c.insert_after(c.cbefore_begin(), 0, 0); assert(i == c.before_begin()); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); i = c.insert_after(c.cbefore_begin(), 3, 3); assert(i == next(c.before_begin(), 3)); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 3); assert(*next(c.begin(), 1) == 3); assert(*next(c.begin(), 2) == 3); i = c.insert_after(c.begin(), 2, 2); assert(i == next(c.begin(), 2)); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); assert(*next(c.begin(), 0) == 3); assert(*next(c.begin(), 1) == 2); assert(*next(c.begin(), 2) == 2); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/pop_front.pass.cpp @@ -27,10 +27,10 @@ c.push_front(1); c.push_front(3); c.pop_front(); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(c.front() == 1); c.pop_front(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -40,10 +40,10 @@ c.push_front(1); c.push_front(3); c.pop_front(); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(c.front() == 1); c.pop_front(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -53,10 +53,10 @@ c.push_front(1); c.push_front(3); c.pop_front(); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(c.front() == 1); c.pop_front(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef MoveOnly T; @@ -65,10 +65,10 @@ c.push_front(1); c.push_front(3); c.pop_front(); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); assert(c.front() == 1); c.pop_front(); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_const.pass.cpp @@ -24,11 +24,11 @@ C c; c.push_front(1); assert(c.front() == 1); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.push_front(3); assert(c.front() == 3); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } #if TEST_STD_VER >= 11 { @@ -37,11 +37,11 @@ C c; c.push_front(1); assert(c.front() == 1); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.push_front(3); assert(c.front() == 3); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_rv.pass.cpp @@ -27,11 +27,11 @@ C c; c.push_front(1); assert(c.front() == 1); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.push_front(3); assert(c.front() == 3); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } { typedef MoveOnly T; @@ -39,11 +39,11 @@ C c; c.push_front(1); assert(c.front() == 1); - assert(distance(c.begin(), c.end()) == 1); + assert(std::distance(c.begin(), c.end()) == 1); c.push_front(3); assert(c.front() == 3); assert(*next(c.begin()) == 1); - assert(distance(c.begin(), c.end()) == 2); + assert(std::distance(c.begin(), c.end()) == 2); } return 0; diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size.pass.cpp @@ -24,15 +24,15 @@ typedef std::forward_list C; C c; c.resize(0); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.resize(10); - assert(distance(c.begin(), c.end()) == 10); + assert(std::distance(c.begin(), c.end()) == 10); c.resize(20); - assert(distance(c.begin(), c.end()) == 20); + assert(std::distance(c.begin(), c.end()) == 20); c.resize(5); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); c.resize(0); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -41,13 +41,13 @@ C c(std::begin(t), std::end(t)); c.resize(3); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); c.resize(6); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -56,7 +56,7 @@ assert(*next(c.begin(), 5) == 0); c.resize(6); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -70,15 +70,15 @@ typedef std::forward_list> C; C c; c.resize(0); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); c.resize(10); - assert(distance(c.begin(), c.end()) == 10); + assert(std::distance(c.begin(), c.end()) == 10); c.resize(20); - assert(distance(c.begin(), c.end()) == 20); + assert(std::distance(c.begin(), c.end()) == 20); c.resize(5); - assert(distance(c.begin(), c.end()) == 5); + assert(std::distance(c.begin(), c.end()) == 5); c.resize(0); - assert(distance(c.begin(), c.end()) == 0); + assert(std::distance(c.begin(), c.end()) == 0); } { typedef int T; @@ -87,13 +87,13 @@ C c(std::begin(t), std::end(t)); c.resize(3); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); c.resize(6); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -102,7 +102,7 @@ assert(*next(c.begin(), 5) == 0); c.resize(6); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp @@ -30,13 +30,13 @@ C c(std::begin(t), std::end(t)); c.resize(3, 10); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); c.resize(6, 10); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -45,7 +45,7 @@ assert(*next(c.begin(), 5) == 10); c.resize(6, 12); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -61,13 +61,13 @@ C c(std::begin(t), std::end(t)); c.resize(3, 10); - assert(distance(c.begin(), c.end()) == 3); + assert(std::distance(c.begin(), c.end()) == 3); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); c.resize(6, 10); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); @@ -76,7 +76,7 @@ assert(*next(c.begin(), 5) == 10); c.resize(6, 12); - assert(distance(c.begin(), c.end()) == 6); + assert(std::distance(c.begin(), c.end()) == 6); assert(*next(c.begin(), 0) == 0); assert(*next(c.begin(), 1) == 1); assert(*next(c.begin(), 2) == 2); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/reverse.pass.cpp @@ -25,7 +25,7 @@ for (int i = 0; i < N; ++i) c.push_front(i); c.reverse(); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); typename C::const_iterator j = c.begin(); for (int i = 0; i < N; ++i, ++j) assert(*j == i); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort.pass.cpp @@ -33,7 +33,7 @@ std::shuffle(v.begin(), v.end(), randomness); C c(v.begin(), v.end()); c.sort(); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); typename C::const_iterator j = c.begin(); for (int i = 0; i < N; ++i, ++j) assert(*j == i); @@ -63,7 +63,7 @@ C c(v.begin(), v.end()); c.sort(); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); // Are we sorted? typename C::const_iterator j = c.begin(); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/sort_pred.pass.cpp @@ -48,7 +48,7 @@ C c(v.begin(), v.end()); c.sort(greater); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); // Are we sorted? typename C::const_iterator j = c.begin(); @@ -75,7 +75,7 @@ std::shuffle(v.begin(), v.end(), randomness); C c(v.begin(), v.end()); c.sort(std::greater()); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); typename C::const_iterator j = c.begin(); for (int i = 0; i < N; ++i, ++j) assert(*j == N-1-i); diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_flist.pass.cpp @@ -36,7 +36,7 @@ assert(*i == t2[n2]); for (; n1 < size_t1; ++n1, ++i) assert(*i == t1[n1]); - assert(distance(c.begin(), c.end()) == size_t1 + l); + assert(std::distance(c.begin(), c.end()) == size_t1 + l); } int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_one.pass.cpp @@ -36,7 +36,7 @@ assert(*i == t2[n2]); for (; n1 < size_t1; ++n1, ++i) assert(*i == t1[n1]); - assert(distance(c.begin(), c.end()) == size_t1 + 1); + assert(std::distance(c.begin(), c.end()) == size_t1 + 1); } template @@ -72,7 +72,7 @@ for (n = p; n < size_t1; ++n, ++i) assert(*i == t1[n]); } - assert(distance(c.begin(), c.end()) == size_t1); + assert(std::distance(c.begin(), c.end()) == size_t1); } int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/splice_after_range.pass.cpp @@ -37,7 +37,7 @@ assert(*i == t2[n2]); for (; n1 < size_t1; ++n1, ++i) assert(*i == t1[n1]); - assert(distance(c.begin(), c.end()) == size_t1 + (l > f+1 ? l-1-f : 0)); + assert(std::distance(c.begin(), c.end()) == size_t1 + (l > f+1 ? l-1-f : 0)); } template @@ -74,7 +74,7 @@ for (n = p; n < size_t1; ++n, ++i) assert(*i == t1[n]); } - assert(distance(c.begin(), c.end()) == size_t1); + assert(std::distance(c.begin(), c.end()) == size_t1); } int main(int, char**) diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/member_swap.pass.cpp @@ -30,13 +30,13 @@ C c2(std::begin(t2), std::end(t2), A(1, 2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -54,10 +54,10 @@ C c2(A(1, 2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -75,13 +75,13 @@ C c2(std::begin(t2), std::end(t2), A(1, 2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator().get_id() == 2); } { @@ -92,10 +92,10 @@ C c2(A(1, 2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator().get_id() == 2); } @@ -109,13 +109,13 @@ C c2(std::begin(t2), std::end(t2), A(2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -133,10 +133,10 @@ C c2(A(2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -154,13 +154,13 @@ C c2(std::begin(t2), std::end(t2), A(2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A(1)); } { @@ -171,10 +171,10 @@ C c2(A(2)); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A(1)); } #if TEST_STD_VER >= 11 @@ -188,13 +188,13 @@ C c2(std::begin(t2), std::end(t2), A()); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -212,10 +212,10 @@ C c2(A{}); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -233,13 +233,13 @@ C c2(std::begin(t2), std::end(t2), A()); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A()); } { @@ -250,10 +250,10 @@ C c2(A{}); c1.swap(c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A()); } #endif diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/non_member_swap.pass.cpp @@ -31,13 +31,13 @@ C c2(std::begin(t2), std::end(t2), A(1, 2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -55,10 +55,10 @@ C c2(A(1, 2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -76,13 +76,13 @@ C c2(std::begin(t2), std::end(t2), A(1, 2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator().get_id() == 2); } { @@ -93,10 +93,10 @@ C c2(A(1, 2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator().get_id() == 1); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator().get_id() == 2); } @@ -110,13 +110,13 @@ C c2(std::begin(t2), std::end(t2), A(2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -134,10 +134,10 @@ C c2(A(2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -155,13 +155,13 @@ C c2(std::begin(t2), std::end(t2), A(2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A(1)); } { @@ -172,10 +172,10 @@ C c2(A(2)); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A(2)); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A(1)); } #if TEST_STD_VER >= 11 @@ -189,13 +189,13 @@ C c2(std::begin(t2), std::end(t2), A()); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -213,10 +213,10 @@ C c2(A{}); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 6); + assert(std::distance(c2.begin(), c2.end()) == 6); assert(*next(c2.begin(), 0) == 0); assert(*next(c2.begin(), 1) == 1); assert(*next(c2.begin(), 2) == 2); @@ -234,13 +234,13 @@ C c2(std::begin(t2), std::end(t2), A()); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 3); + assert(std::distance(c1.begin(), c1.end()) == 3); assert(*next(c1.begin(), 0) == 10); assert(*next(c1.begin(), 1) == 11); assert(*next(c1.begin(), 2) == 12); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A()); } { @@ -251,10 +251,10 @@ C c2(A{}); swap(c1, c2); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c1.get_allocator() == A()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(c2.get_allocator() == A()); } #endif diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter.pass.cpp @@ -25,19 +25,19 @@ ++i; std::list::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == 3); assert(*l1.begin() == 1); assert(*next(l1.begin()) == 3); j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == 1); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -47,19 +47,19 @@ ++i; std::list>::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == 3); assert(*l1.begin() == 1); assert(*next(l1.begin()) == 3); j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == 1); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/erase_iter_iter.pass.cpp @@ -23,14 +23,14 @@ std::list l1(a1, a1+3); std::list::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); } { std::list l1(a1, a1+3); std::list::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert(l1 == std::list(a1+1, a1+3)); } @@ -38,7 +38,7 @@ std::list l1(a1, a1+3); std::list::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert(l1 == std::list(a1+2, a1+3)); } @@ -46,7 +46,7 @@ std::list l1(a1, a1+3); std::list::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); } #if TEST_STD_VER >= 11 @@ -54,14 +54,14 @@ std::list> l1(a1, a1+3); std::list>::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); } { std::list> l1(a1, a1+3); std::list>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert((l1 == std::list>(a1+1, a1+3))); } @@ -69,7 +69,7 @@ std::list> l1(a1, a1+3); std::list>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert((l1 == std::list>(a1+2, a1+3))); } @@ -77,7 +77,7 @@ std::list> l1(a1, a1+3); std::list>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); } #endif diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp @@ -27,7 +27,7 @@ typename List::iterator i = l1.insert(l1.begin(), a1, a1+3); assert(i == l1.begin()); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); i = l1.begin(); assert(*i == 1); ++i; @@ -38,7 +38,7 @@ i = l1.insert(i, a2, a2+3); assert(*i == 4); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); i = l1.begin(); assert(*i == 1); ++i; @@ -65,7 +65,7 @@ } assert(globalMemCounter.checkOutstandingNewEq(save_count)); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); i = l1.begin(); assert(*i == 1); ++i; diff --git a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.modifiers/insert_iter_value.pass.cpp @@ -27,7 +27,7 @@ typename List::iterator i = l1.insert(next(l1.cbegin()), 4); assert(i == next(l1.begin())); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l1 == List(a2, a2+4)); #if !defined(TEST_HAS_NO_EXCEPTIONS) && !defined(DISABLE_NEW_COUNT) diff --git a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/sort.pass.cpp @@ -44,7 +44,7 @@ C c(v.begin(), v.end()); c.sort(); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); // Are we sorted? typename C::const_iterator j = c.begin(); diff --git a/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp @@ -64,7 +64,7 @@ C c(v.begin(), v.end()); c.sort(greater); - assert(distance(c.begin(), c.end()) == N); + assert(std::distance(c.begin(), c.end()) == N); // Are we sorted? typename C::const_iterator j = c.begin(); diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list.pass.cpp @@ -25,18 +25,18 @@ std::list l2; l1.splice(l1.end(), l2); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); } { std::list l1; std::list l2(a2, a2+1); l1.splice(l1.end(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); } @@ -45,9 +45,9 @@ std::list l2(a2, a2+2); l1.splice(l1.end(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -58,9 +58,9 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -73,9 +73,9 @@ std::list l2; l1.splice(l1.begin(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); } @@ -84,9 +84,9 @@ std::list l2; l1.splice(l1.end(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); } @@ -95,9 +95,9 @@ std::list l2(a2, a2+1); l1.splice(l1.begin(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -108,9 +108,9 @@ std::list l2(a2, a2+1); l1.splice(l1.end(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -121,9 +121,9 @@ std::list l2(a2, a2+2); l1.splice(l1.begin(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -136,9 +136,9 @@ std::list l2(a2, a2+2); l1.splice(l1.end(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -151,9 +151,9 @@ std::list l2(a2, a2+3); l1.splice(l1.begin(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -168,9 +168,9 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -185,9 +185,9 @@ std::list l2; l1.splice(l1.begin(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -198,9 +198,9 @@ std::list l2; l1.splice(next(l1.begin()), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -211,9 +211,9 @@ std::list l2; l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -224,9 +224,9 @@ std::list l2(a2, a2+1); l1.splice(l1.begin(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -239,9 +239,9 @@ std::list l2(a2, a2+1); l1.splice(next(l1.begin()), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -254,9 +254,9 @@ std::list l2(a2, a2+1); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -269,9 +269,9 @@ std::list l2(a2, a2+2); l1.splice(l1.begin(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -286,9 +286,9 @@ std::list l2(a2, a2+2); l1.splice(next(l1.begin()), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -303,9 +303,9 @@ std::list l2(a2, a2+2); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -320,9 +320,9 @@ std::list l2(a2, a2+3); l1.splice(l1.begin(), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -341,9 +341,9 @@ std::list l2(a2, a2+3); l1.splice(next(l1.begin()), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -362,9 +362,9 @@ std::list l2(a2, a2+3); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -383,9 +383,9 @@ std::list l2(a2, a2+3); l1.splice(next(l1.begin(), 3), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -405,18 +405,18 @@ std::list> l2; l1.splice(l1.end(), l2); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); } { std::list> l1; std::list> l2(a2, a2+1); l1.splice(l1.end(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); } @@ -425,9 +425,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.end(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -438,9 +438,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -453,9 +453,9 @@ std::list> l2; l1.splice(l1.begin(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); } @@ -464,9 +464,9 @@ std::list> l2; l1.splice(l1.end(), l2); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); } @@ -475,9 +475,9 @@ std::list> l2(a2, a2+1); l1.splice(l1.begin(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -488,9 +488,9 @@ std::list> l2(a2, a2+1); l1.splice(l1.end(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -501,9 +501,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.begin(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -516,9 +516,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.end(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -531,9 +531,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.begin(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -548,9 +548,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -565,9 +565,9 @@ std::list> l2; l1.splice(l1.begin(), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -578,9 +578,9 @@ std::list> l2; l1.splice(next(l1.begin()), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -591,9 +591,9 @@ std::list> l2; l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -604,9 +604,9 @@ std::list> l2(a2, a2+1); l1.splice(l1.begin(), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -619,9 +619,9 @@ std::list> l2(a2, a2+1); l1.splice(next(l1.begin()), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -634,9 +634,9 @@ std::list> l2(a2, a2+1); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -649,9 +649,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.begin(), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -666,9 +666,9 @@ std::list> l2(a2, a2+2); l1.splice(next(l1.begin()), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -683,9 +683,9 @@ std::list> l2(a2, a2+2); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 4); - assert(distance(l1.begin(), l1.end()) == 4); + assert(std::distance(l1.begin(), l1.end()) == 4); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -700,9 +700,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.begin(), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -721,9 +721,9 @@ std::list> l2(a2, a2+3); l1.splice(next(l1.begin()), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -742,9 +742,9 @@ std::list> l2(a2, a2+3); l1.splice(next(l1.begin(), 2), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -763,9 +763,9 @@ std::list> l2(a2, a2+3); l1.splice(next(l1.begin(), 3), l2); assert(l1.size() == 6); - assert(distance(l1.begin(), l1.end()) == 6); + assert(std::distance(l1.begin(), l1.end()) == 6); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter.pass.cpp @@ -25,9 +25,9 @@ std::list l2(a2, a2+1); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); } @@ -36,9 +36,9 @@ std::list l2(a2, a2+2); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 1); - assert(distance(l2.begin(), l2.end()) == 1); + assert(std::distance(l2.begin(), l2.end()) == 1); std::list::const_iterator i = l1.begin(); assert(*i == 4); i = l2.begin(); @@ -49,9 +49,9 @@ std::list l2(a2, a2+2); l1.splice(l1.end(), l2, next(l2.begin())); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 1); - assert(distance(l2.begin(), l2.end()) == 1); + assert(std::distance(l2.begin(), l2.end()) == 1); std::list::const_iterator i = l1.begin(); assert(*i == 5); i = l2.begin(); @@ -62,9 +62,9 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 4); i = l2.begin(); @@ -77,9 +77,9 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin())); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 5); i = l2.begin(); @@ -92,9 +92,9 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin(), 2)); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 6); i = l2.begin(); @@ -106,7 +106,7 @@ std::list l1(a1, a1+1); l1.splice(l1.begin(), l1, l1.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); std::list::const_iterator i = l1.begin(); assert(*i == 1); } @@ -115,9 +115,9 @@ std::list l2(a2, a2+1); l1.splice(l1.begin(), l2, l2.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -128,9 +128,9 @@ std::list l2(a2, a2+1); l1.splice(next(l1.begin()), l2, l2.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -140,7 +140,7 @@ std::list l1(a1, a1+2); l1.splice(l1.begin(), l1, l1.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -150,7 +150,7 @@ std::list l1(a1, a1+2); l1.splice(l1.begin(), l1, next(l1.begin())); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -160,7 +160,7 @@ std::list l1(a1, a1+2); l1.splice(next(l1.begin()), l1, l1.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -170,7 +170,7 @@ std::list l1(a1, a1+2); l1.splice(next(l1.begin()), l1, next(l1.begin())); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -182,9 +182,9 @@ std::list> l2(a2, a2+1); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); } @@ -193,9 +193,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 1); - assert(distance(l2.begin(), l2.end()) == 1); + assert(std::distance(l2.begin(), l2.end()) == 1); std::list>::const_iterator i = l1.begin(); assert(*i == 4); i = l2.begin(); @@ -206,9 +206,9 @@ std::list> l2(a2, a2+2); l1.splice(l1.end(), l2, next(l2.begin())); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 1); - assert(distance(l2.begin(), l2.end()) == 1); + assert(std::distance(l2.begin(), l2.end()) == 1); std::list>::const_iterator i = l1.begin(); assert(*i == 5); i = l2.begin(); @@ -219,9 +219,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2, l2.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 4); i = l2.begin(); @@ -234,9 +234,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin())); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 5); i = l2.begin(); @@ -249,9 +249,9 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin(), 2)); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(l2.size() == 2); - assert(distance(l2.begin(), l2.end()) == 2); + assert(std::distance(l2.begin(), l2.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 6); i = l2.begin(); @@ -263,7 +263,7 @@ std::list> l1(a1, a1+1); l1.splice(l1.begin(), l1, l1.begin()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); std::list>::const_iterator i = l1.begin(); assert(*i == 1); } @@ -272,9 +272,9 @@ std::list> l2(a2, a2+1); l1.splice(l1.begin(), l2, l2.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 4); ++i; @@ -285,9 +285,9 @@ std::list> l2(a2, a2+1); l1.splice(next(l1.begin()), l2, l2.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(l2.size() == 0); - assert(distance(l2.begin(), l2.end()) == 0); + assert(std::distance(l2.begin(), l2.end()) == 0); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -297,7 +297,7 @@ std::list> l1(a1, a1+2); l1.splice(l1.begin(), l1, l1.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -307,7 +307,7 @@ std::list> l1(a1, a1+2); l1.splice(l1.begin(), l1, next(l1.begin())); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -317,7 +317,7 @@ std::list> l1(a1, a1+2); l1.splice(next(l1.begin()), l1, l1.begin()); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -327,7 +327,7 @@ std::list> l1(a1, a1+2); l1.splice(next(l1.begin()), l1, next(l1.begin())); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; diff --git a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.ops/splice_pos_list_iter_iter.pass.cpp @@ -24,7 +24,7 @@ std::list l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin())); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -36,7 +36,7 @@ std::list l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin(), 2)); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -48,7 +48,7 @@ std::list l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin(), 3)); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -61,7 +61,7 @@ std::list l2(a2, a2+3); l1.splice(l1.begin(), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list::const_iterator i = l1.begin(); assert(*i == 5); ++i; @@ -81,7 +81,7 @@ std::list l2(a2, a2+3); l1.splice(next(l1.begin()), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -101,7 +101,7 @@ std::list l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -121,7 +121,7 @@ std::list> l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin())); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -133,7 +133,7 @@ std::list> l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin(), 2)); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list>::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -145,7 +145,7 @@ std::list> l1(a1, a1+3); l1.splice(l1.begin(), l1, next(l1.begin()), next(l1.begin(), 3)); assert(l1.size() == 3); - assert(distance(l1.begin(), l1.end()) == 3); + assert(std::distance(l1.begin(), l1.end()) == 3); std::list>::const_iterator i = l1.begin(); assert(*i == 2); ++i; @@ -158,7 +158,7 @@ std::list> l2(a2, a2+3); l1.splice(l1.begin(), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list>::const_iterator i = l1.begin(); assert(*i == 5); ++i; @@ -178,7 +178,7 @@ std::list> l2(a2, a2+3); l1.splice(next(l1.begin()), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; @@ -198,7 +198,7 @@ std::list> l2(a2, a2+3); l1.splice(l1.end(), l2, next(l2.begin()), l2.end()); assert(l1.size() == 5); - assert(distance(l1.begin(), l1.end()) == 5); + assert(std::distance(l1.begin(), l1.end()) == 5); std::list>::const_iterator i = l1.begin(); assert(*i == 1); ++i; diff --git a/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp --- a/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.special/swap.pass.cpp @@ -39,7 +39,7 @@ swap(c1, c2); assert(c1 == std::list(a2, a2 + 7)); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); } { int a1[] = {1, 3, 7, 9, 10}; @@ -47,7 +47,7 @@ std::list c2; swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2 == std::list(a1, a1 + 5)); } { @@ -55,9 +55,9 @@ std::list c2; swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); } { int a1[] = {1, 3, 7, 9, 10}; @@ -100,7 +100,7 @@ swap(c1, c2); assert((c1 == std::list>(a2, a2 + 7))); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); } { int a1[] = {1, 3, 7, 9, 10}; @@ -108,7 +108,7 @@ std::list> c2; swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert((c2 == std::list>(a1, a1 + 5))); } { @@ -116,9 +116,9 @@ std::list> c2; swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); } { int a1[] = {1, 3, 7, 9, 10}; diff --git a/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/erase_iter.pass.cpp @@ -26,19 +26,19 @@ ++i; std::vector::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == true); assert(*l1.begin() == 1); assert(*next(l1.begin()) == true); j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == true); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); } #if TEST_STD_VER >= 11 { @@ -47,19 +47,19 @@ ++i; std::vector>::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == true); assert(*l1.begin() == 1); assert(*next(l1.begin()) == true); j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == true); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); } #endif diff --git a/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/erase_iter_iter.pass.cpp @@ -24,14 +24,14 @@ std::vector l1(a1, a1+3); std::vector::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); } { std::vector l1(a1, a1+3); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert(l1 == std::vector(a1+1, a1+3)); } @@ -39,7 +39,7 @@ std::vector l1(a1, a1+3); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert(l1 == std::vector(a1+2, a1+3)); } @@ -47,7 +47,7 @@ std::vector l1(a1, a1+3); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); } #if TEST_STD_VER >= 11 @@ -55,14 +55,14 @@ std::vector> l1(a1, a1+3); std::vector>::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); } { std::vector> l1(a1, a1+3); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert((l1 == std::vector>(a1+1, a1+3))); } @@ -70,7 +70,7 @@ std::vector> l1(a1, a1+3); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert((l1 == std::vector>(a1+2, a1+3))); } @@ -78,7 +78,7 @@ std::vector> l1(a1, a1+3); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); } #endif diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter.pass.cpp @@ -58,7 +58,7 @@ ++i; std::vector::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == 3); assert(*l1.begin() == 1); assert(*next(l1.begin()) == 3); @@ -66,13 +66,13 @@ j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == 1); assert(is_contiguous_container_asan_correct(l1)); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); assert(is_contiguous_container_asan_correct(l1)); } #if TEST_STD_VER >= 11 @@ -84,7 +84,7 @@ ++i; std::vector>::iterator j = l1.erase(i); assert(l1.size() == 2); - assert(distance(l1.begin(), l1.end()) == 2); + assert(std::distance(l1.begin(), l1.end()) == 2); assert(*j == 3); assert(*l1.begin() == 1); assert(*next(l1.begin()) == 3); @@ -92,13 +92,13 @@ j = l1.erase(j); assert(j == l1.end()); assert(l1.size() == 1); - assert(distance(l1.begin(), l1.end()) == 1); + assert(std::distance(l1.begin(), l1.end()) == 1); assert(*l1.begin() == 1); assert(is_contiguous_container_asan_correct(l1)); j = l1.erase(l1.begin()); assert(j == l1.end()); assert(l1.size() == 0); - assert(distance(l1.begin(), l1.end()) == 0); + assert(std::distance(l1.begin(), l1.end()) == 0); assert(is_contiguous_container_asan_correct(l1)); } #endif diff --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/erase_iter_iter.pass.cpp @@ -41,7 +41,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); assert(is_contiguous_container_asan_correct(l1)); } @@ -50,7 +50,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert(l1 == std::vector(a1+1, a1+3)); assert(is_contiguous_container_asan_correct(l1)); @@ -60,7 +60,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert(l1 == std::vector(a1+2, a1+3)); assert(is_contiguous_container_asan_correct(l1)); @@ -70,7 +70,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); assert(is_contiguous_container_asan_correct(l1)); } @@ -93,7 +93,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector>::iterator i = l1.erase(l1.cbegin(), l1.cbegin()); assert(l1.size() == 3); - assert(distance(l1.cbegin(), l1.cend()) == 3); + assert(std::distance(l1.cbegin(), l1.cend()) == 3); assert(i == l1.begin()); assert(is_contiguous_container_asan_correct(l1)); } @@ -102,7 +102,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin())); assert(l1.size() == 2); - assert(distance(l1.cbegin(), l1.cend()) == 2); + assert(std::distance(l1.cbegin(), l1.cend()) == 2); assert(i == l1.begin()); assert((l1 == std::vector>(a1+1, a1+3))); assert(is_contiguous_container_asan_correct(l1)); @@ -112,7 +112,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 2)); assert(l1.size() == 1); - assert(distance(l1.cbegin(), l1.cend()) == 1); + assert(std::distance(l1.cbegin(), l1.cend()) == 1); assert(i == l1.begin()); assert((l1 == std::vector>(a1+2, a1+3))); assert(is_contiguous_container_asan_correct(l1)); @@ -122,7 +122,7 @@ assert(is_contiguous_container_asan_correct(l1)); std::vector>::iterator i = l1.erase(l1.cbegin(), next(l1.cbegin(), 3)); assert(l1.size() == 0); - assert(distance(l1.cbegin(), l1.cend()) == 0); + assert(std::distance(l1.cbegin(), l1.cend()) == 0); assert(i == l1.begin()); assert(is_contiguous_container_asan_correct(l1)); } diff --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp --- a/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap.pass.cpp @@ -44,7 +44,7 @@ swap(c1, c2); assert(c1 == std::vector(a2, a2+sizeof(a2)/sizeof(a2[0]))); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); } @@ -57,7 +57,7 @@ assert(is_contiguous_container_asan_correct(c2)); swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2 == std::vector(a1, a1+sizeof(a1)/sizeof(a1[0]))); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); @@ -71,9 +71,9 @@ assert(is_contiguous_container_asan_correct(c2)); swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); } @@ -129,7 +129,7 @@ swap(c1, c2); assert((c1 == std::vector>(a2, a2+sizeof(a2)/sizeof(a2[0])))); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); } @@ -142,7 +142,7 @@ assert(is_contiguous_container_asan_correct(c2)); swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert((c2 == std::vector>(a1, a1+sizeof(a1)/sizeof(a1[0])))); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); @@ -156,9 +156,9 @@ assert(is_contiguous_container_asan_correct(c2)); swap(c1, c2); assert(c1.empty()); - assert(distance(c1.begin(), c1.end()) == 0); + assert(std::distance(c1.begin(), c1.end()) == 0); assert(c2.empty()); - assert(distance(c2.begin(), c2.end()) == 0); + assert(std::distance(c2.begin(), c2.end()) == 0); assert(is_contiguous_container_asan_correct(c1)); assert(is_contiguous_container_asan_correct(c2)); }