public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] libstdc++: Replace TR1 components with C++11 ones in test utils
@ 2021-08-03 15:34 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-08-03 15:34 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 775 bytes --]

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

libstdc++-v3/ChangeLog:

	* testsuite/util/testsuite_common_types.h: Replace uses of
	tr1::unordered_map and tr1::unordered_set with their C++11
	equivalents.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
	dg-error line number.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
	Likewise.

Tested powerpc64le-linux. Committed to trunk.


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 7497 bytes --]

commit 5c6759e41607f9edbbe25be18bd322d6a0408238
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Aug 3 15:02:50 2021

    libstdc++: Replace TR1 components with C++11 ones in test utils
    
    Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
    
    libstdc++-v3/ChangeLog:
    
            * testsuite/util/testsuite_common_types.h: Replace uses of
            tr1::unordered_map and tr1::unordered_set with their C++11
            equivalents.
            * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
            dg-error line number.
            * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
            * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
            Likewise.
            * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc:
            Likewise.
            * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
            Likewise.
            * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
            Likewise.
            * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
            Likewise.

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
index 4907312b547..f0520af8e0d 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
@@ -27,5 +27,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 659 }
+// { dg-error "deleted" "" { target *-*-* } 663 }
 // { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
index 0b67f61dd14..76bb2d60350 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
@@ -27,5 +27,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 698 }
+// { dg-error "deleted" "" { target *-*-* } 702 }
 // { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
index c54a51e4cab..8def1559bd4 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
@@ -28,5 +28,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 659 }
+// { dg-error "deleted" "" { target *-*-* } 663 }
 // { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
index c7d01ee31d8..9ef033bd678 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
@@ -28,5 +28,5 @@ int main()
   return 0;
 }
 
-// { dg-error "deleted" "" { target *-*-* } 698 }
+// { dg-error "deleted" "" { target *-*-* } 702 }
 // { dg-prune-output "include" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc
index f6749fdd97b..69c307bebae 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc
@@ -26,8 +26,8 @@ int main()
   return 0;
 }
 
-// { dg-error "operator" "" { target *-*-* } 495 }
-// { dg-error "operator" "" { target *-*-* } 496 }
-// { dg-error "operator" "" { target *-*-* } 497 }
+// { dg-error "operator" "" { target *-*-* } 499 }
+// { dg-error "operator" "" { target *-*-* } 500 }
+// { dg-error "operator" "" { target *-*-* } 501 }
 
 // { dg-prune-output "declared here" }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
index 765e3af270e..31ce7d0d149 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
@@ -27,6 +27,6 @@ int main()
   return 0;
 }
 
-// { dg-error "operator" "" { target *-*-* } 447 }
-// { dg-error "operator" "" { target *-*-* } 448 }
-// { dg-error "operator" "" { target *-*-* } 449 }
+// { dg-error "operator" "" { target *-*-* } 451 }
+// { dg-error "operator" "" { target *-*-* } 452 }
+// { dg-error "operator" "" { target *-*-* } 453 }
diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
index 55c331deb59..7df8ff7ecfb 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
@@ -27,6 +27,6 @@ int main()
   return 0;
 }
 
-// { dg-error "operator" "" { target *-*-* } 425 }
-// { dg-error "operator" "" { target *-*-* } 426 }
-// { dg-error "operator" "" { target *-*-* } 427 }
+// { dg-error "operator" "" { target *-*-* } 429 }
+// { dg-error "operator" "" { target *-*-* } 430 }
+// { dg-error "operator" "" { target *-*-* } 431 }
diff --git a/libstdc++-v3/testsuite/util/testsuite_common_types.h b/libstdc++-v3/testsuite/util/testsuite_common_types.h
index a9a44df9664..9a3152b3a84 100644
--- a/libstdc++-v3/testsuite/util/testsuite_common_types.h
+++ b/libstdc++-v3/testsuite/util/testsuite_common_types.h
@@ -40,13 +40,17 @@
 
 #include <map>
 #include <set>
-#include <tr1/functional>
-#include <tr1/unordered_map>
-#include <tr1/unordered_set>
 
 #if __cplusplus >= 201103L
 #include <atomic>
 #include <type_traits>
+#include <unordered_map>
+#include <unordered_set>
+namespace unord = std;
+#else
+#include <tr1/unordered_map>
+#include <tr1/unordered_set>
+namespace unord = std::tr1;
 #endif
 
 namespace __gnu_test
@@ -185,14 +189,14 @@ namespace __gnu_test
       typedef Tp			    		value_type;
       typedef Tp 					key_type;
       typedef std::pair<const key_type, value_type> 	pair_type;
-      typedef std::tr1::hash<key_type>      		hash_function;
+      typedef unord::hash<key_type>      		hash_function;
       typedef std::equal_to<key_type>      		equality_function;
 
       template<typename Tl>
         struct container
 	{
 	  typedef Tl 					allocator_type;
-	  typedef std::tr1::unordered_map<key_type, value_type, hash_function, equality_function, allocator_type>	type;
+	  typedef unord::unordered_map<key_type, value_type, hash_function, equality_function, allocator_type>	type;
 	};
 
       typedef allocator_policies<pair_type, Thread>	allocator_types;
@@ -224,14 +228,14 @@ namespace __gnu_test
     {
       typedef Tp			    		value_type;
       typedef Tp 					key_type;
-      typedef std::tr1::hash<key_type>      		hash_function;
+      typedef unord::hash<key_type>      		hash_function;
       typedef std::equal_to<key_type>      		equality_function;
 
       template<typename Tl>
         struct container
 	{
 	  typedef Tl 					allocator_type;
-	  typedef std::tr1::unordered_set<key_type, hash_function, equality_function, allocator_type>	type;
+	  typedef unord::unordered_set<key_type, hash_function, equality_function, allocator_type>	type;
 	};
 
       typedef allocator_policies<key_type, Thread>	allocator_types;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-03 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 15:34 [committed] libstdc++: Replace TR1 components with C++11 ones in test utils Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).