From: redi Date: Tue, 22 Oct 2019 21:48:57 +0000 (+0000) Subject: Restore use of tr1::unordered_map in testsuite X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b85fac30f4108ee527e1ab1f417f123b2197d53;p=thirdparty%2Fgcc.git 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@277302 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6ffe6fa12b5b..87ee636ceb87 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 8f6a89e87398..4edf833bd593 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.