Skip to content

Commit 9917d39

Browse files
[libc++] <experimental/simd> Fix vector_aligned_tag (llvm#76611)
Co-authored-by: Nikolas Klauser <[email protected]>
1 parent d83d1cb commit 9917d39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libcxx/include/experimental/__simd/aligned_tag.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define _LIBCPP_EXPERIMENTAL___SIMD_ALIGNED_TAG_H
1212

1313
#include <__memory/assume_aligned.h>
14+
#include <__type_traits/remove_const.h>
1415
#include <cstddef>
1516
#include <experimental/__config>
1617
#include <experimental/__simd/traits.h>
@@ -35,7 +36,7 @@ inline constexpr bool is_simd_flag_type_v<element_aligned_tag> = true;
3536

3637
struct vector_aligned_tag {
3738
template <class _Tp, class _Up = typename _Tp::value_type>
38-
static constexpr size_t __alignment = memory_alignment_v<_Tp, _Up>;
39+
static constexpr size_t __alignment = memory_alignment_v<_Tp, remove_const_t<_Up>>;
3940

4041
template <class _Tp, class _Up>
4142
static _LIBCPP_HIDE_FROM_ABI constexpr _Up* __apply(_Up* __ptr) {

0 commit comments

Comments
 (0)