On 15 November 2017 at 17:40, Jonathan Wakely wrote: > On 15 November 2017 at 17:38, Jason Arnold wrote: >> The GCC7 notes says >> >> - A new power-of-two rehashing policy for use with the _Hashtable internals, >> thanks to François Dumont. >> >> What do I have to do to use this instead of the default prime rehash >> policy, for example with std::unordered_set/map? > > You can't use it with unordered_map, because there's no way to change > the rehash policy. You'd need to use the _Hashtable type directly, > rather than via unordered_set. For example, see the libstdc++-v3/testsuite/23_containers/unordered_set/hash_policy/26132.cc file in the GCC sources.