From aa8b363171a95b8f867a74f29c75f9577e9087e1 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Wed, 24 May 2023 12:50:46 +0200 Subject: [PATCH] libstdc++: Fix SFINAE for __is_intrinsic_type on ARM On ARM NEON doesn't support double, so __is_intrinsic_type_v should say false (instead of being ill-formed). Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/109261 * include/experimental/bits/simd.h (__intrinsic_type): Specialize __intrinsic_type and __intrinsic_type in any case, but provide the member type only with __aarch64__. --- libstdc++-v3/include/experimental/bits/simd.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index b0571ca26c41..d1f388310f91 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -2369,15 +2369,21 @@ template <> struct __intrinsic_type { using type = float32x4_t; }; -#if _GLIBCXX_SIMD_HAVE_NEON_A64 template <> struct __intrinsic_type - { using type = float64x1_t; }; + { +#if _GLIBCXX_SIMD_HAVE_NEON_A64 + using type = float64x1_t; +#endif + }; template <> struct __intrinsic_type - { using type = float64x2_t; }; + { +#if _GLIBCXX_SIMD_HAVE_NEON_A64 + using type = float64x2_t; #endif + }; #define _GLIBCXX_SIMD_ARM_INTRIN(_Bits, _Np) \ template <> \ -- 2.47.2