diff --git a/include/type_traits b/include/type_traits index e496c382..a8afb9d9 100644 --- a/include/type_traits +++ b/include/type_traits @@ -1190,7 +1190,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage union type { _Aligner __align; - unsigned char __data[_Len]; + unsigned char __data[(_Len + _Align - 1)/_Align * _Align]; }; }; @@ -1205,7 +1205,7 @@ struct _LIBCPP_TYPE_VIS_ONLY aligned_storage<_Len, n>\ {\ struct _ALIGNAS(n) type\ {\ - unsigned char __lx[_Len];\ + unsigned char __lx[(_Len + n - 1)/n * n];\ };\ }