aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-10-22 22:48:57 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-10-22 22:48:57 +0100
commit4190b7f17a771d013070e1fd5a4374963a0582d6 (patch)
treea4f8d6056e24ccb9028d9c7c7d73f4612890bf75
parent9e1f9bc54496c65a11987dc7c238c84878d10062 (diff)
downloadgcc-4190b7f17a771d013070e1fd5a4374963a0582d6.zip
gcc-4190b7f17a771d013070e1fd5a4374963a0582d6.tar.gz
gcc-4190b7f17a771d013070e1fd5a4374963a0582d6.tar.bz2
Restore use of tr1::unordered_map in testsuite
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
-rw-r--r--libstdc++-v3/ChangeLog3
-rw-r--r--libstdc++-v3/testsuite/util/testsuite_abi.h10
2 files changed, 11 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 6ffe6fa..87ee636 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,8 @@
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.
diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h
index 8f6a89e..4edf833 100644
--- a/libstdc++-v3/testsuite/util/testsuite_abi.h
+++ b/libstdc++-v3/testsuite/util/testsuite_abi.h
@@ -22,7 +22,13 @@
#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.
@@ -65,7 +71,7 @@ struct symbol
};
// 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.