Landing: c092571209a0

Project / Subsystem

gcc / libstdc++

Date

2026-08-05

Author

Tomasz Kamiński

Commit

c092571209a0cc163374adc156a4fb179b27942e

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
—
commit_hash
c092571209a0cc163374adc156a4fb179b27942e
source_type
github
headline
Make internal bit manipulation functions available in C++11
tldr
Internal bit manipulation functions are now constexpr and available for C++11, improving code quality and enabling more compile-time operations.
author
Tomasz Kamiński
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • constexpr
  • • bit manipulation
  • • c++11
discussion_id_link
—
bugzilla_pr
—
date
2026-08-05T00:00:00.000Z

This commit enhances several internal bit manipulation functions within libstdc++, making them available as constexpr in C++11. Functions like __countl_zero, __countr_zero, __popcount, __bit_width, and __bit_floor now support C++11 compilation and can be evaluated at compile time. Specializations for __rand_uint128 are also provided, and __bit_floor is optimized for specific types to avoid unnecessary dependencies.