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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 16 09:29:26 PDT 2023


Mordante added a comment.

Thanks for the patch!

I'm not really fond of declaring the MSVC ABI as unstable. If there is no other way, please add this information in the commit message. That way we can find back why it was decided to declare the ABI on a platform as unstable.



================
Comment at: libcxx/include/optional:641
 template <class _Tp>
-class optional
+class _LIBCPP_DECLSPEC_EMPTY_BASES optional
     : private __optional_move_assign_base<_Tp>
----------------
Why not guard this attribute with a `_LIBCPP_ABI_FOO_FLAG` instead of breaking the ABI 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