2012-07-25 François Dumont <fdumont@gcc.gnu.org>
commit9f1b2bcf66046225ae5e0b15236f8176e8ed2647
authorfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jul 2012 19:32:48 +0000 (25 19:32 +0000)
committerfdumont <fdumont@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jul 2012 19:32:48 +0000 (25 19:32 +0000)
tree68aefb11e267b8b894dec8ab1bc6c6da96a9fae8
parentc5faecd5d979741ba6124898ffddc0a41572c6e0
2012-07-25  François Dumont  <fdumont@gcc.gnu.org>

PR libstdc++/54075
* include/bits/hashtable.h
(_Hashtable<>::_Hashtable(_InputIterator, _InputIterator,
size_type, ...): Remove std::max usage to guarantee that hashtable
state is consistent with hash policy state.
(_Hashtable<>::rehash): Likewise. Set _M_prev_resize to 0 to avoid
the hashtable to be shrinking on next insertion.
* testsuite/23_containers/unordered_set/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multiset/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_map/modifiers/reserve.cc: New.
* testsuite/23_containers/unordered_multimap/modifiers/reserve.cc: New.

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