hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize...
authorFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 14 Sep 2011 19:50:20 +0000 (19:50 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Wed, 14 Sep 2011 19:50:20 +0000 (19:50 +0000)
commit7e5ac0a4f5ac37ed9a6198fd694bc81635c688c6
treee57293aee651dc24fd4a5d2b5324dcce635cc539
parent700cf92e7575733adbc4a8200b602179a3194a16
hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize on exception.

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.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>
From-SVN: r178861
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]