[libcxx-commits] [PATCH] D122135: [libc++] Use [[no_unique_address]] in __compressed_pair in ABIv2

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 21 10:49:02 PDT 2022


Mordante added a comment.

I haven't looked at the patch closely. But I wonder whether we really want this.

For example a user uses the unstable ABI and uses `std::unique_ptr` in an interface of their own library.
When this library is used with other libraries that use different language versions, for example C++17 and C++20, the layout of `std::unique_ptr` may differ between these two libraries, causing ODR violations.
(Obviously this affects more types since `__compressed_pair` is used at a lot of places.

Unless somebody convinces me I'm mistaken regarding the ODR violations, I would suggest to abandon this patch.
(In that case let's discuss it further on Discord.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122135/new/

https://reviews.llvm.org/D122135



More information about the libcxx-commits mailing list