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

David Benjamin via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Mar 19 19:08:59 PDT 2023


davidben added inline comments.


================
Comment at: libcxx/include/optional:641
 template <class _Tp>
-class optional
+class _LIBCPP_DECLSPEC_EMPTY_BASES optional
     : private __optional_move_assign_base<_Tp>
----------------
EricWF wrote:
> Mordante wrote:
> > Why not guard this attribute with a `_LIBCPP_ABI_FOO_FLAG` instead of breaking the ABI unconditionally?
> Because that would prevent most users from ever getting value from it.
> 
> If we don't have any libc++ users who care about ABI compatibility with MSVC, then we should do this unconditionally.
Unconditional is also my preference, but I'll do whatever the project prefers. Currently assuming that's to leave it at is. (What's the process for driving that question to a conclusion?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146190



More information about the libcxx-commits mailing list