Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-21 Thread Jonathan Wakely
On 21/09/18 18:10 +0200, François Dumont wrote: Here is the patch complement. load_factor.cc failure revealed a bug in load factor management. Now computation of _M_next_resize is consistent throughout the different places where it is set. The 2 other tests only have to be adapted.     PR l

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-21 Thread François Dumont
Here is the patch complement. load_factor.cc failure revealed a bug in load factor management. Now computation of _M_next_resize is consistent throughout the different places where it is set. The 2 other tests only have to be adapted.     PR libstdc++/87135     * src/c++11/hashtable_c++0x.cc

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-19 Thread François Dumont
On 09/19/2018 01:07 PM, Jonathan Wakely wrote: On 18/09/18 22:39 +0200, François Dumont wrote: On 09/18/2018 10:41 AM, Jonathan Wakely wrote: On 13/09/18 07:49 +0200, François Dumont wrote: All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-19 Thread Jonathan Wakely
On 18/09/18 22:39 +0200, François Dumont wrote: On 09/18/2018 10:41 AM, Jonathan Wakely wrote: On 13/09/18 07:49 +0200, François Dumont wrote: All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what its comment was declaring that is to say:   //

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-19 Thread Jonathan Wakely
On 18/09/18 22:39 +0200, François Dumont wrote: On 09/18/2018 10:41 AM, Jonathan Wakely wrote: On 13/09/18 07:49 +0200, François Dumont wrote: All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what its comment was declaring that is to say:   //

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-18 Thread François Dumont
On 09/18/2018 10:41 AM, Jonathan Wakely wrote: On 13/09/18 07:49 +0200, François Dumont wrote: All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what its comment was declaring that is to say:   // Return a prime no smaller than n. _Prime_rehash

Re: [PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-18 Thread Jonathan Wakely
On 13/09/18 07:49 +0200, François Dumont wrote: All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what its comment was declaring that is to say:   // Return a prime no smaller than n. _Prime_rehash_policy::_M_need_rehash rehash only when _M_next

[PATCH] PR libstdc++/87135 Rehash only when necessary (LWG2156)

2018-09-12 Thread François Dumont
All changes limited to hashtable_c++0x.cc file. _Prime_rehash_policy::_M_next_bkt now really does what its comment was declaring that is to say:   // Return a prime no smaller than n. _Prime_rehash_policy::_M_need_rehash rehash only when _M_next_size is exceeded, not only when it is reach.