Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/tsl/robin_growth_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ class power_of_two_growth_policy {

/**
* Return the maximum number of buckets supported by the policy.
*
* Static: does not depend on instance state. Calling the non-static form
* from the constructor made GCC 16 emit -Wmaybe-uninitialized on the
* implicit this pointer (see Tessil/robin-map#93).
*/
std::size_t max_bucket_count() const {
static constexpr std::size_t max_bucket_count() noexcept {
// Largest power of two.
return (std::numeric_limits<std::size_t>::max() / 2) + 1;
}
Expand Down