Landing: c30bf3aee78b
Project / Subsystem
gcc / libstdc++
Date
2026-05-05
Author
Jonathan Wakely
Commit
c30bf3aee78bbe9bd557c7bcd5d2d5533f6a216e
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- c30bf3aee78bbe9bd557c7bcd5d2d5533f6a216e
- source_type
- github
- headline
- Libstdc++: Replace uses of EBO with [[no_unique_address]]
- tldr
- The libstdc++ now uses the `[[no_unique_address]]` attribute instead of empty base optimization (EBO) to reduce the size of class layouts.
- author
- Jonathan Wakely
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • optimization
- • C++17
- • ABI
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-05T00:00:00.000Z
The libstdc++ now uses the [[no_unique_address]] attribute instead of empty base optimization (EBO) in <tuple> and <bits/shared_ptr_base.h>. This modernizes the code and simplifies the implementation on compilers that support the attribute, which includes Clang (since v9) and GCC itself. This change reduces the size of class layouts by allowing empty base classes to be stored in the same memory location as other members.