[PATCH] D65249: [NFC] use C++11 in AlignOf.h

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 26 16:33:05 PDT 2019


jfb added a comment.

In D65249#1603278 <https://reviews.llvm.org/D65249#1603278>, @BillyONeal wrote:

> > @BillyONeal do you know if 19.11 has the aligned_storage issue on x86?
>
> aligned_storage is still capped at what the library can fake with unions. It would be an ABI break to change it to use alignas, so things where the x86 stack temporarily breaks T's usual alignment rules will affect it (and for all releases using VS2015's ABI). We recommend customers use `alignas(T) unsigned char space[sizeof(T)]` if they can't tolerate such limitations.


Thanks!

@rnk: how about I add a bit of code that wraps `aligned_storage` on all platforms except MSVC (where I'd implement it as Billy suggests). That would mean updating all the uses of `aligned_storage` to this LLVM one, but that's not a big deal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65249





More information about the cfe-commits mailing list