My recent change to this file broke running the testsuite with
-std=c++98 because std::unordered_map isn't available. This fixes it.
* testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
when compiled as C++98.
From-SVN: r277302
2019-10-22 Jonathan Wakely <jwakely@redhat.com>
+ * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
+ when compiled as C++98.
+
* include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
* testsuite/17_intro/names.cc: Check uses_allocator in C++98.
#include <stdexcept>
#include <vector>
#include <locale>
-#include <unordered_map>
+#if __cplusplus >= 201103L
+# include <unordered_map>
+namespace unord = std;
+#else
+# include <tr1/unordered_map>
+namespace unord = std::tr1;
+#endif
#include <cxxabi.h>
// Encapsulates symbol characteristics.
};
// Map type between symbol names and full symbol info.
-typedef std::unordered_map<std::string, symbol> symbols;
+typedef unord::unordered_map<std::string, symbol> symbols;
// Check.