r264413 - in /trunk/libstdc++-v3: ChangeLog src...

fdumont@gcc.gnu.org fdumont@gcc.gnu.org
Tue Sep 18 20:36:00 GMT 2018


Author: fdumont
Date: Tue Sep 18 20:36:16 2018
New Revision: 264413

URL: https://gcc.gnu.org/viewcvs?rev=264413&root=gcc&view=rev
Log:
2018-09-18  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/87135
	* src/c++11/hashtable_c++0x.cc:
	(_Prime_rehash_policy::_M_next_bkt): Return a prime no smaller than
	requested size, but not necessarily greater.
	(_Prime_rehash_policy::_M_need_rehash): Rehash only if target size is
	strictly greater than next resize threshold.
	* testsuite/23_containers/unordered_map/modifiers/reserve.cc: Adapt test
	to validate that there is no rehash as long as number of insertion is
	lower or equal to the reserved number of elements.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/src/c++11/hashtable_c++0x.cc
    trunk/libstdc++-v3/testsuite/23_containers/unordered_map/modifiers/reserve.cc



More information about the Libstdc++-cvs mailing list