Replace uses of std::tr1::unordered_map in testsuite
authorJonathan Wakely <jwakely@redhat.com>
Fri, 4 Oct 2019 15:08:14 +0000 (16:08 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 4 Oct 2019 15:08:14 +0000 (16:08 +0100)
* testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
std::tr1::unordered_map.
* testsuite/util/testsuite_allocator.h: Likewise.

From-SVN: r276584

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/util/testsuite_abi.h
libstdc++-v3/testsuite/util/testsuite_allocator.h

index 9122cd168910202126c1add88ea6c01468c93ff5..1e49d3a7d04ff7403971dfb43ce6b21e1ba5a2d5 100644 (file)
@@ -1,5 +1,9 @@
 2019-10-04  Jonathan Wakely  <jwakely@redhat.com>
 
+       * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
+       std::tr1::unordered_map.
+       * testsuite/util/testsuite_allocator.h: Likewise.
+
        * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
 
        * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
index 47fbd76bb96b13d393a7356c0e9160ddb4b8cf1c..8f6a89e873986313ef15326f8e3aed58226f6d67 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdexcept>
 #include <vector>
 #include <locale>
-#include <tr1/unordered_map>
+#include <unordered_map>
 #include <cxxabi.h>
 
 // Encapsulates symbol characteristics.
@@ -65,7 +65,7 @@ struct symbol
 };
 
 // Map type between symbol names and full symbol info.
-typedef std::tr1::unordered_map<std::string, symbol>   symbols;
+typedef std::unordered_map<std::string, symbol>        symbols;
 
 
 // Check.
index 34dba16669fef84ae8bc4c989a75e2f199625029..67e70a29edb483af91f28f7eff8f83c099fff6ef 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef _GLIBCXX_TESTSUITE_ALLOCATOR_H
 #define _GLIBCXX_TESTSUITE_ALLOCATOR_H
 
-#include <tr1/unordered_map>
 #include <bits/move.h>
 #include <ext/pointer.h>
 #include <ext/alloc_traits.h>
 # include <new>
 #endif
 
+#if __cplusplus >= 201103L
+# include <unordered_map>
+namespace unord = std;
+#else
+# include <tr1/unordered_map>
+namespace unord = std::tr1;
+#endif
+
 namespace __gnu_test
 {
   class tracker_allocator_counter
@@ -269,7 +276,7 @@ namespace __gnu_test
   // (see N1599).
   struct uneq_allocator_base
   {
-    typedef std::tr1::unordered_map<void*, int>   map_type;
+    typedef unord::unordered_map<void*, int>   map_type;
 
     // Avoid static initialization troubles and/or bad interactions
     // with tests linking testsuite_allocator.o and playing globally