From 4190b7f17a771d013070e1fd5a4374963a0582d6 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 22 Oct 2019 22:48:57 +0100 Subject: [PATCH] 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 --- libstdc++-v3/ChangeLog | 3 +++ libstdc++-v3/testsuite/util/testsuite_abi.h | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6ffe6fa12b5..87ee636ceb8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,8 @@ 2019-10-22 Jonathan Wakely + * 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 8f6a89e8739..4edf833bd59 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.h +++ b/libstdc++-v3/testsuite/util/testsuite_abi.h @@ -22,7 +22,13 @@ #include #include #include -#include +#if __cplusplus >= 201103L +# include +namespace unord = std; +#else +# include +namespace unord = std::tr1; +#endif #include // Encapsulates symbol characteristics. @@ -65,7 +71,7 @@ struct symbol }; // Map type between symbol names and full symbol info. -typedef std::unordered_map symbols; +typedef unord::unordered_map symbols; // Check. -- 2.30.2