OSDN Git Service

2011-09-14 Fran├žois Dumont <fdumont@gcc.gnu.org>
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Sep 2011 19:50:20 +0000 (19:50 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Sep 2011 19:50:20 +0000 (19:50 +0000)
commitc41cafd5576b6e48806ca9a3af3635cb41206593
treee57293aee651dc24fd4a5d2b5324dcce635cc539
parent5902c6c2cc8006b8bb9352075eaade85beeb2ed5
2011-09-14  Fran├žois Dumont  <fdumont@gcc.gnu.org>
    Paolo Carlini  <paolo.carlini@oracle.com>

* include/bits/hashtable.h (_Hashtable<>::_M_rehash): Take and restore
hash policy _M_prev_resize on exception.
(_Hashtable<>::_M_insert_bucket): Capture hash policy next resize
before using it and use latter method to have it restored on exception.
(_Hashtable<>::_M_insert(_Arg&& __v, std::false_type): Likewise.
(_Hashtable<>::insert(_InputIterator, _InputIterator): Likewise.
(_Hashtable<>::rehash): Likewise.
* testsuite/23_containers/unordered_set/insert/hash_policy.cc: New.
* testsuite/23_containers/unordered_multiset/insert/hash_policy.cc:
Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178861 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/hashtable.h
libstdc++-v3/testsuite/23_containers/unordered_multiset/insert/hash_policy.cc [new file with mode: 0644]
libstdc++-v3/testsuite/23_containers/unordered_set/insert/hash_policy.cc [new file with mode: 0644]