From 7a25e5ecdb312dda46065c7b84ea5fe79711306d Mon Sep 17 00:00:00 2001 From: redi Date: Fri, 4 Oct 2019 15:08:14 +0000 Subject: [PATCH] Replace uses of std::tr1::unordered_map in testsuite * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of std::tr1::unordered_map. * testsuite/util/testsuite_allocator.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276584 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 4 ++++ libstdc++-v3/testsuite/util/testsuite_abi.h | 4 ++-- libstdc++-v3/testsuite/util/testsuite_allocator.h | 11 +++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9122cd168910..1e49d3a7d04f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2019-10-04 Jonathan Wakely + * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of + std::tr1::unordered_map. + * testsuite/util/testsuite_allocator.h: Likewise. + * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits. * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use diff --git a/libstdc++-v3/testsuite/util/testsuite_abi.h b/libstdc++-v3/testsuite/util/testsuite_abi.h index 47fbd76bb96b..8f6a89e87398 100644 --- a/libstdc++-v3/testsuite/util/testsuite_abi.h +++ b/libstdc++-v3/testsuite/util/testsuite_abi.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include // Encapsulates symbol characteristics. @@ -65,7 +65,7 @@ struct symbol }; // Map type between symbol names and full symbol info. -typedef std::tr1::unordered_map symbols; +typedef std::unordered_map symbols; // Check. diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 34dba16669fe..67e70a29edb4 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -26,7 +26,6 @@ #ifndef _GLIBCXX_TESTSUITE_ALLOCATOR_H #define _GLIBCXX_TESTSUITE_ALLOCATOR_H -#include #include #include #include @@ -36,6 +35,14 @@ # include #endif +#if __cplusplus >= 201103L +# include +namespace unord = std; +#else +# include +namespace unord = std::tr1; +#endif + namespace __gnu_test { class tracker_allocator_counter @@ -269,7 +276,7 @@ namespace __gnu_test // (see N1599). struct uneq_allocator_base { - typedef std::tr1::unordered_map map_type; + typedef unord::unordered_map map_type; // Avoid static initialization troubles and/or bad interactions // with tests linking testsuite_allocator.o and playing globally -- 2.47.2