[libcxx-commits] [libcxx] [libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (PR #76756)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 22 08:31:21 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.
+#ifdef _LIBCPP_ABI_MICROSOFT
+# define _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING
+#endif
----------------
ldionne wrote:
```suggestion
// [[msvc::no_unique_address]] seems to mostly affect empty classes, so the padding scheme for Itanium doesn't work.
#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING)
# define _LIBCPP_ABI_NO_COMPRESSED_PAIR_PADDING
#endif
```
https://github.com/llvm/llvm-project/pull/76756
More information about the libcxx-commits
mailing list