diff --git a/libcxx/include/experimental/__simd/aligned_tag.h b/libcxx/include/experimental/__simd/aligned_tag.h index edbb3b24931f5..31d2b50aa1dd3 100644 --- a/libcxx/include/experimental/__simd/aligned_tag.h +++ b/libcxx/include/experimental/__simd/aligned_tag.h @@ -11,6 +11,7 @@ #define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H #include <__memory/assume_aligned.h> +#include <__type_traits/remove_const.h> #include #include #include @@ -35,7 +36,7 @@ inline constexpr bool is_simd_flag_type_v = true; struct vector_aligned_tag { template - static constexpr size_t __alignment = memory_alignment_v<_Tp, _Up>; + static constexpr size_t __alignment = memory_alignment_v<_Tp, remove_const_t<_Up>>; template static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) {