[libcxx-commits] [PATCH] D128285: [libc++][AIX] Make basic_string layout compatible with earlier version
Hubert Tong via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 21 16:58:20 PDT 2022
hubert.reinterpretcast added inline comments.
Comment at: libcxx/include/string:724
- struct __long
+ struct __long_impl
> How exactly is this different from using `__atrribute__((__packed__))`? If it's not I would suggest to put `__is_long_` and `__cap_` into it's own struct and mark only that as `__attribute__((__packed__))`to avoid the explicit padding and `alignas()` specifiers.
That should work. Any preference between base class, anonymous struct, or named member?
The named member version is the most pragmatic (does not change whether the type is standard layout, does not use language extension).
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits