From 95757e522e315b154d47243830255df1f9ad33e2 Mon Sep 17 00:00:00 2001 From: paolo Date: Thu, 19 Nov 2009 16:55:25 +0000 Subject: 2009-11-19 Paolo Carlini PR libstdc++/41622 * include/bits/functional_hash.h: Implement inline the various std::hash specializations, using, when appropriate, pass by const ref too, per DR 1245. * include/tr1_impl/functional_hash.h: Remove, move its contents... * include/tr1/functional_hash.h: ... here. * include/std/functional: Tweak includes. * src/hash_c++0x: Rename to... * src/compatibility-c++0x.cc: ... this, implementing compatibility std::hash<>::operator() specializations. * src/hash.cc: Do not mark specializations as throw(). * src/Makefile.am: Adjust. * include/Makefile.am: Likewise. * src/Makefile.in: Regenerate. * include/Makefile.in: Likewise. * testsuite/util/testsuite_api.h: Define a dummy hash for NonDefaultConstructible. * testsuite/23_containers/unordered_map/requirements/ explicit_instantiation/2.cc: Use it. * testsuite/23_containers/unordered_multimap/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/23_containers/unordered_set/requirements/ explicit_instantiation/2.cc: Likewise. * testsuite/23_containers/unordered_multiset/requirements/ explicit_instantiation/2.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154335 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../unordered_map/requirements/explicit_instantiation/2.cc | 5 +++-- .../unordered_multimap/requirements/explicit_instantiation/2.cc | 5 +++-- .../unordered_multiset/requirements/explicit_instantiation/2.cc | 4 +++- .../unordered_set/requirements/explicit_instantiation/2.cc | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'libstdc++-v3/testsuite/23_containers') diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc index f6b5fe37274..851790824e8 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc @@ -24,5 +24,6 @@ #include #include -typedef __gnu_test::NonDefaultConstructible inst_type; -template class std::unordered_map; +typedef __gnu_test::NonDefaultConstructible inst_type; +typedef __gnu_test::NonDefaultConstructible_hash hash_type; +template class std::unordered_map; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/2.cc index e26428dd698..2eef3715df6 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/2.cc @@ -24,5 +24,6 @@ #include #include -typedef __gnu_test::NonDefaultConstructible inst_type; -template class std::unordered_multimap; +typedef __gnu_test::NonDefaultConstructible inst_type; +typedef __gnu_test::NonDefaultConstructible_hash hash_type; +template class std::unordered_multimap; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/2.cc index d2a120a533e..5764e924e39 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/2.cc @@ -24,4 +24,6 @@ #include #include -template class std::unordered_multiset<__gnu_test::NonDefaultConstructible>; +typedef __gnu_test::NonDefaultConstructible inst_type; +typedef __gnu_test::NonDefaultConstructible_hash hash_type; +template class std::unordered_multiset; diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/2.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/2.cc index 13e9e37c3dd..e2276046044 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/2.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/explicit_instantiation/2.cc @@ -24,4 +24,6 @@ #include #include -template class std::unordered_set<__gnu_test::NonDefaultConstructible>; +typedef __gnu_test::NonDefaultConstructible inst_type; +typedef __gnu_test::NonDefaultConstructible_hash hash_type; +template class std::unordered_set; -- cgit v1.2.1