aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-10-04 16:08:14 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-10-04 16:08:14 +0100
commit0a789c10e91ec8c8f021f72f7df6045d019e5538 (patch)
treeb4690d32d9f10b04a5d223cd0d35985e86ac504f
parentdde4026df03a2b5fdd8bd68bdf51edc23a61ffc8 (diff)
downloadgcc-0a789c10e91ec8c8f021f72f7df6045d019e5538.zip
gcc-0a789c10e91ec8c8f021f72f7df6045d019e5538.tar.gz
gcc-0a789c10e91ec8c8f021f72f7df6045d019e5538.tar.bz2
Replace uses of std::tr1::unordered_map in testsuite
* testsuite/util/testsuite_abi.h: Use std::unordered_map instead of std::tr1::unordered_map. * testsuite/util/testsuite_allocator.h: Likewise. From-SVN: r276584
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_abi.h4
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_allocator.h11
3 files changed, 15 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9122cd1..1e49d3a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h
index 47fbd76..8f6a89e 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.h
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.h
@@ -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.
diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h
index 34dba16..67e70a2 100644
--- a/libstdc++-v3/testsuite/util/testsuite_allocator.h
+++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h
@@ -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>
@@ -36,6 +35,14 @@
# 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