[libcxx-commits] [PATCH] D103357: [libc++][format] Add __format_arg_store.
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 1 08:33:45 PDT 2021
Mordante added a comment.
In D103357#2975190 <https://reviews.llvm.org/D103357#2975190>, @ldionne wrote:
> I read the comments and while I am not a big fan of reimplementing `std::variant`, I understand why it's needed (unless we want to break `std::variant`'s ABI, which we don't). Also, this needs to make progress so I'm approving it -- worst case I can request some post-commit changes.
Thanks!
A note on the `std::variant`; breaking the ABI won't help. The tags and unions should be stored separately, something like:
std::array<tag, 4> tags;
std::array<unions, 4> unions;
And the note mentions packing the unions, so something like:
std::array<tag, 4> tags;
std::tuple<t0, t1, t2, t3> packed_unions;
(This is an example, I haven't investigated the solution I want to use.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103357/new/
https://reviews.llvm.org/D103357
More information about the libcxx-commits
mailing list