New hashtable power 2 rehash policy

Jonathan Wakely
Wed May 25 09:17:00 GMT 2016

On 25/05/16 10:15 +0200, Andreas Schwab wrote:
>François Dumont <> writes:
>>     * include/bits/c++config (_GLIBCXX14_USE_CONSTEXPR): New.
>FAIL: ext/profile/  (test for errors, line 324)
>FAIL: ext/profile/ (test for excess errors)
>Excess errors:
>/usr/local/gcc/gcc-20160525/Build/ia64-suse-linux/libstdc++-v3/include/ia64-suse-linux/bits/c++config.h:326:4: error: #error illegal use of multiple inlined namespaces

Fixed with this patch (we don't need the new macro anyway, so it can
be simply removed).

The mutable specifier on _Power2_rehash_policy::_M_next_bkt is also
unnecessary, because the member functions that change it don't need to
be const. It's best to avoid mutable wherever possible, since in
general modifying member data in const functions leads to data races.
In this case it doesn't, because the const member functions are only
called on non-const objects, so the functions don't need to be const.

I'll commit to trunk when testing finishes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2657 bytes
Desc: not available
URL: <>

More information about the Libstdc++ mailing list