[libcxx-commits] [libcxx] Lower std::string's alignment requirement	from 16 to 8. (PR #68749)
    Louis Dionne via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Tue Oct 10 16:08:53 PDT 2023
    
    
  
================
@@ -1851,7 +1851,14 @@ private:
         _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
         size_type __align_it(size_type __s) _NOEXCEPT
             {return (__s + (__a-1)) & ~(__a-1);}
-    enum {__alignment = 16};
+    enum {
+      __alignment =
+#ifdef _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
+      8
+#else
+      16
----------------
ldionne wrote:
Do you know why the library originally used `16`?
https://github.com/llvm/llvm-project/pull/68749
    
    
More information about the libcxx-commits
mailing list