[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)

Lénárd Szolnoki via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 28 15:59:09 PDT 2024


================
@@ -150,6 +176,11 @@
 // ABI impact: changes the iterator type of `vector` (except `vector<bool>`).
 // #define _LIBCPP_ABI_BOUNDED_ITERATORS_IN_VECTOR
 
+// [[msvc::no_unique_address]] seems to mostly affect empty classes, so the padding scheme for Itanium doesn't work.
----------------
leni536 wrote:

Even if it doesn't affect non-empty types, `_LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING` also removes the alignment adjustment for the compressed pair members on Microsoft ABI. Is that intentional?

https://github.com/llvm/llvm-project/pull/76756


More information about the libcxx-commits mailing list