]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix experimental::__is_x86_pd() [PR124657]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 5 May 2026 18:12:58 +0000 (19:12 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 5 May 2026 18:15:28 +0000 (19:15 +0100)
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

index 5d4ed5ad58c8e9193ad88ecefcf581731b15a30a..b2d564676b0cc7f7ca19fa2507ba1070b07eb977 100644 (file)
@@ -426,11 +426,14 @@ template <typename _Tp>
   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 <typename _Tp, size_t _Np>