[libcxx-commits] [PATCH] D125496: [libc++] Simplify the string structures a bit more

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri May 13 09:39:29 PDT 2022


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.

Other than my comment, LGTM.



================
Comment at: libcxx/include/string:737-739
+        size_type __is_long_ : 1;
+        size_type __size_ : 7;
+        char __padding_[sizeof(value_type) - 1];
----------------
Here and above, we assume that `7+1 == 8 == CHAR_BIT`, since the padding could potentially be wrong if that were not the case. I think this is a pre-existing condition, but I would suggest asserting it. Basically, I think our implementation doesn't support systems where `CHAR_BIT != 8`. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125496



More information about the libcxx-commits mailing list