diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-11-19 16:55:25 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-11-19 16:55:25 +0000 |
commit | 4a85780b75143fa28bc26ce508eafa95c5f5b3e8 (patch) | |
tree | c2be9169ddada0db0f1c418fab39fb8d3c3ea0a6 /libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc | |
parent | d95ba652abbbfda10f29ca8b80c2126825a65eeb (diff) | |
download | gcc-4a85780b75143fa28bc26ce508eafa95c5f5b3e8.tar.gz |
re PR libstdc++/41622 ([DR 1245] [c++0x] std::hash<std::string>::operator() copies its argument)
2009-11-19 Paolo Carlini <paolo.carlini@oracle.com>
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.
From-SVN: r154335
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc')
-rw-r--r-- | libstdc++-v3/testsuite/23_containers/unordered_map/requirements/explicit_instantiation/2.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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 <testsuite_hooks.h> #include <testsuite_api.h> -typedef __gnu_test::NonDefaultConstructible inst_type; -template class std::unordered_map<inst_type, inst_type>; +typedef __gnu_test::NonDefaultConstructible inst_type; +typedef __gnu_test::NonDefaultConstructible_hash hash_type; +template class std::unordered_map<inst_type, inst_type, hash_type>; |