[libcxx-commits] [PATCH] D120064: Fix EBO on std::optional and std::variant when targeting the MSVC ABI

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 1 11:19:41 PST 2022


mstorsjo added subscribers: hans, thakis, rnk.
mstorsjo added a comment.

In D120064#3351148 <https://reviews.llvm.org/D120064#3351148>, @ldionne wrote:

> In D120064#3329840 <https://reviews.llvm.org/D120064#3329840>, @jdoerrie wrote:
>
>> Hi both, PTAL. I was surprised to find out that both `std::variant<int>` and `std::optional<int>` have a sizeof 12 in my environment, this is my attempt to fix it. Please do let me know if there are other places I need to change, or how I would write a test to prevent future regressions.
>
> This is an ABI break on Windows, pinging @mstorsjo.

@rnk @thakis @hans Is such an ABI break in libc++ for the clang-cl case tolerable for you guys?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120064



More information about the libcxx-commits mailing list