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
#include <stdexcept>
#include <vector>
#include <locale>
-#include <tr1/unordered_map>
+#include <unordered_map>
#include <cxxabi.h>
// Encapsulates symbol characteristics.
};
// 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.
#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
// (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