Skip to content

fix: make power_of_two max_bucket_count static constexpr (#93) - #96

Open
wangshuo-wsws wants to merge 1 commit into
Tessil:masterfrom
wangshuo-wsws:fix/gcc16-max-bucket-count-static-93
Open

fix: make power_of_two max_bucket_count static constexpr (#93)#96
wangshuo-wsws wants to merge 1 commit into
Tessil:masterfrom
wangshuo-wsws:fix/gcc16-max-bucket-count-static-93

Conversation

@wangshuo-wsws

Copy link
Copy Markdown

Fixes #93

Summary

  • Make power_of_two_growth_policy::max_bucket_count() static constexpr.
  • It does not read instance state; the non-static form triggered GCC 16 -Wmaybe-uninitialized on the implicit this when called from the constructor.

Test plan

  • Build with GCC 16 + -Wall -Wextra and confirm the warning is gone.
  • Existing robin-map tests still pass.

Signed-off-by: harleywilsoneng <harleywilsoneng@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCC 16.1.0 emits -Wmaybe-uninitialized in power_of_two_growth_policy constructor

1 participant