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. Tested x86_64-linux, committed to trunk.
commit 8ffc60659009bfca2152c6e3af846d8700393ece Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Oct 22 22:45:42 2019 +0100 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. diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h index 8f6a89e8739..4edf833bd59 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.