]> gcc.gnu.org Git - gcc.git/commitdiff
libstdc++: Qualify functions used in tests
authorJonathan Wakely <jwakely@redhat.com>
Mon, 24 May 2021 17:42:09 +0000 (18:42 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 24 May 2021 17:42:09 +0000 (18:42 +0100)
These tests rely on ADL for some functions, probably unintentionally.
The calls only work because the iterator wrappers derive from
std::iterator and so namespace std is an associated namespace.

libstdc++-v3/ChangeLog:

* testsuite/25_algorithms/inplace_merge/constrained.cc: Qualify
call to ranges::next.
* testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
* testsuite/25_algorithms/is_sorted_until/constrained.cc:
Likewise.
* testsuite/25_algorithms/swap_ranges/1.cc: Qualify call to
swap_ranges.

libstdc++-v3/testsuite/25_algorithms/inplace_merge/constrained.cc
libstdc++-v3/testsuite/25_algorithms/is_sorted/constrained.cc
libstdc++-v3/testsuite/25_algorithms/is_sorted_until/constrained.cc
libstdc++-v3/testsuite/25_algorithms/swap_ranges/1.cc

index e1f59bf86b553c315851447526a7e1d81a30f6e2..2f3d5d6955a8ec374c64842ba22f1092be44227b 100644 (file)
@@ -41,7 +41,7 @@ test01()
        ranges::sort(v);
 
        test_range<int, bidirectional_iterator_wrapper> rz(v.data(), v.data()+i+j);
-       auto result = ranges::inplace_merge(rz, next(ranges::begin(rz), i));
+       auto result = ranges::inplace_merge(rz, ranges::next(ranges::begin(rz), i));
        VERIFY( result == rz.end() );
 
        VERIFY( ranges::is_sorted(rz) );
index c3764846090e36db2f1595d5edb487a23e29360b..92440bb7bd7df56bdd98c68a763e8407193c5b86 100644 (file)
@@ -46,7 +46,7 @@ test02()
   test_range<int, forward_iterator_wrapper> rx(x);
   VERIFY( ranges::is_sorted(rx) );
   VERIFY( !ranges::is_sorted(ranges::begin(rx),
-                            next(ranges::begin(rx), 2),
+                            ranges::next(ranges::begin(rx), 2),
                             ranges::greater{}) );
 }
 
index 9d23ebc81fe8d2f2550f80a5f8256b984529d653..bc32334831300ed5e64106476df68952e4e7b346 100644 (file)
@@ -50,9 +50,9 @@ test02()
   test_range<int, forward_iterator_wrapper> rx(x);
   VERIFY( ranges::is_sorted_until(rx) == ranges::end(rx) );
   VERIFY( ranges::is_sorted_until(ranges::begin(rx),
-                                 next(ranges::begin(rx), 2),
+                                 ranges::next(ranges::begin(rx), 2),
                                  ranges::greater{})
-         == next(ranges::begin(rx), 1) );
+         == ranges::next(ranges::begin(rx), 1) );
 }
 
 constexpr bool
index 31eee31cd6d85edbc02cca6d2a8f81ad58b69cbf..4660199af505d18faff443d781864b525f9d9723 100644 (file)
@@ -24,7 +24,7 @@
 using __gnu_test::test_container;
 using __gnu_test::forward_iterator_wrapper;
 
-typedef test_container<int, forward_iterator_wrapper> Container; 
+typedef test_container<int, forward_iterator_wrapper> Container;
 
 
 void
@@ -46,10 +46,10 @@ test2()
   int array2[] = {1};
   Container con1(array1, array1);
   Container con2(array2, array2);
-  VERIFY(swap_ranges(con1.begin(), con1.end(), con2.begin()).ptr == array2);
+  VERIFY(std::swap_ranges(con1.begin(), con1.end(), con2.begin()).ptr == array2);
 }
 
-int 
+int
 main()
 {
   test1();
This page took 0.067313 seconds and 5 git commands to generate.