2013-01-28 François Dumont <fdumont@gcc.gnu.org>
commitec812219bbf38cbfd1505733c1c473ddb3edb729
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2013 20:52:13 +0000 (28 20:52 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 28 Jan 2013 20:52:13 +0000 (28 20:52 +0000)
tree8545a60d6c1448b1ab73d4df8cbd0068780d2f08
parentb433697be05a6f133ac71ed30e7312270c65344b
2013-01-28  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/hashtable_policy.h (_Local_iterator_base): Use
_Hashtable_ebo_helper to embed functors into the local_iterator
when necessary. Pass information about functors involved in hash
code by copy.
* include/bits/hashtable.h (__cache_default): Do not cache for
builtin integral types unless the hash functor is not noexcept
qualified or is not default constructible. Adapt static assertions
and local iterator instantiations.
* include/debug/unordered_set
(std::__debug::unordered_set<>::erase): Detect local iterators to
invalidate using contained node rather than generating a dummy
local_iterator instance.
(std::__debug::unordered_multiset<>::erase): Likewise.
* include/debug/unordered_map
(std::__debug::unordered_map<>::erase): Likewise.
(std::__debug::unordered_multimap<>::erase): Likewise.
* testsuite/performance/23_containers/insert_erase/41975.cc: Test
std::tr1 and std versions of unordered_set regardless of any
macro. Add test on default cache behavior.
* testsuite/performance/23_containers/insert/54075.cc: Likewise.
* testsuite/23_containers/unordered_set/instantiation_neg.cc:
Adapt line number.
* testsuite/23_containers/unordered_set/
not_default_constructible_hash_neg.cc: New.
* testsuite/23_containers/unordered_set/buckets/swap.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195517 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/include/bits/hashtable_policy.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/testsuite/23_containers/unordered_set/buckets/swap.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc
libstdc++-v3/testsuite/23_containers/unordered_set/not_default_constructible_hash_neg.cc [copied from libstdc++-v3/testsuite/23_containers/unordered_set/instantiation_neg.cc with 69% similarity]
libstdc++-v3/testsuite/performance/23_containers/insert/54075.cc
libstdc++-v3/testsuite/performance/23_containers/insert_erase/41975.cc