[libcxx-commits] [PATCH] D128285: [libc++][AIX] Make basic_string layout compatible with earlier version
Xing Xue via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 22 11:17:30 PDT 2022
xingxue marked an inline comment as done.
xingxue added a comment.
> The build failure is unrelated, can you rebase before reuploading this patch?
Definitely, rebased before uploading the latest diff.
================
Comment at: libcxx/include/string:726
{
- size_type __is_long_ : 1;
- size_type __cap_ : sizeof(size_type) * CHAR_BIT - 1;
+ struct _LIBCPP_PACKED {
+ size_type __is_long_ : 1;
----------------
Mordante wrote:
> Please add a comment explaining why we packed is needed.
> (I understand it, but over a year I will scratch my head.)
Done, thanks!
================
Comment at: libcxx/include/string:749
static_assert(sizeof(__short) == (sizeof(value_type) * (__min_cap + 1)), "__short has an unexpected size.");
----------------
Mordante wrote:
> Does `__long` have a fixed size too? If so can add a `static_assert` for it too?
`static_assert` for `__long` added, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128285/new/
https://reviews.llvm.org/D128285
More information about the libcxx-commits
mailing list