[libcxx-commits] [libcxx] Lower std::string's alignment requirement from 16 to 8. (PR #68807)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 11 11:48:36 PDT 2023


================
@@ -18,7 +18,13 @@
 #include "test_macros.h"
 
 // alignment of the string heap buffer is hardcoded to 16
-static const std::size_t alignment = 16;
+
+static const std::size_t alignment =
+#ifdef _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
----------------
EricWF wrote:

I would rather revisit this after landing the change.
There's more risk and more reason to reject the changes if we apply it globally.
So let's get this in, then consider if we can push it to everybody.

https://github.com/llvm/llvm-project/pull/68807


More information about the libcxx-commits mailing list