Share via


concurrent_unordered_map::rehash Method

Rebuilds the hash table.

void rehash(
   size_type _Buckets
);

Parameters

  • _Buckets
    The desired number of buckets.

Remarks

The member function alters the number of buckets to be at least _Buckets and rebuilds the hash table as needed. The number of buckets must be a power of 2. If not a power of 2, it will be rounded up to the next largest power of 2.

It throws an out_of_range exception if the number of buckets is invalid (either 0 or greater than the maximum number of buckets).

Requirements

Header: internal_concurrent_hash.h

Namespace: concurrency

See Also

Reference

concurrent_unordered_map Class