Closed
Description
As covered in crbug.com/338094922 , __compressed_pair
is a major contributor to debug info size. Many libc++ classes use them to store allocators, default deleters, and other things. I believe that no_unique_address
was intended to be layout-compatible with the __compressed_pair
technique, but I'm not sure it actually is.
Regardless, for unstable ABI users, it would be a major QoI improvement to avoid extra compressed pair template instantiations.
I thought this feature request had already been filed, but I couldn't find it.
Related work:
- https://reviews.llvm.org/D153991
- Implement [[msvc::no_unique_address]] #65675
- Missing [[no_unique_address]] support on Windows #49358
- [libc++]
no_unique_address
is reserved word in pre-C++20 dialects (non-conforming) #61196
Can we do this yet?