Commit 4190b7f1 by Jonathan Wakely Committed by Jonathan Wakely

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
parent 9e1f9bc5
2019-10-22 Jonathan Wakely <jwakely@redhat.com> 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. * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
* testsuite/17_intro/names.cc: Check uses_allocator in C++98. * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
......
...@@ -22,7 +22,13 @@ ...@@ -22,7 +22,13 @@
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
#include <locale> #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> #include <cxxabi.h>
// Encapsulates symbol characteristics. // Encapsulates symbol characteristics.
...@@ -65,7 +71,7 @@ struct symbol ...@@ -65,7 +71,7 @@ struct symbol
}; };
// Map type between symbol names and full symbol info. // 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. // Check.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment