From 8d287bd70446e5ec3b0eb909d32d03dd65c67bae Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 5 May 2026 19:12:58 +0100 Subject: [PATCH] libstdc++: Fix experimental::__is_x86_pd() [PR124657] libstdc++-v3/ChangeLog: PR libstdc++/124657 * include/experimental/bits/simd_x86.h (__is_x86_pd): Fix macro names and refactor to reduce instantiations. --- libstdc++-v3/include/experimental/bits/simd_x86.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/simd_x86.h b/libstdc++-v3/include/experimental/bits/simd_x86.h index 5d4ed5ad58c..b2d564676b0 100644 --- a/libstdc++-v3/include/experimental/bits/simd_x86.h +++ b/libstdc++-v3/include/experimental/bits/simd_x86.h @@ -426,11 +426,14 @@ template constexpr bool __is_x86_pd() { -#if __LDBL_MANT_DIG == __DBL_MANT_DIG - if constexpr (is_same_v<_Tp, long double>) + if constexpr (is_same_v<_Tp, double>) + return true; +#if __LDBL_MANT_DIG__ == __DBL_MANT_DIG__ + else if constexpr (is_same_v<_Tp, long double>) return true; #endif - return is_same_v<_Tp, double>; + else + return false; } template