[libcxx-commits] [PATCH] D146190: Fix EBO on std::optional and std::variant when targeting the MSVC ABI
Eric Fiselier via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 17 14:35:11 PDT 2023
EricWF accepted this revision as: EricWF.
EricWF 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>
----------------
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.
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