Title: [289148] trunk/Source/WTF
Revision
289148
Author
wei...@apple.com
Date
2022-02-04 20:04:21 -0800 (Fri, 04 Feb 2022)

Log Message

Make isNaNConstExpr actually constexpr
https://bugs.webkit.org/show_bug.cgi?id=236162

Reviewed by Darin Adler.

* wtf/MathExtras.h:
(WTF::isNaNConstExpr): Add missing constexpr.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (289147 => 289148)


--- trunk/Source/WTF/ChangeLog	2022-02-05 03:30:56 UTC (rev 289147)
+++ trunk/Source/WTF/ChangeLog	2022-02-05 04:04:21 UTC (rev 289148)
@@ -1,5 +1,15 @@
 2022-02-04  Sam Weinig  <wei...@apple.com>
 
+        Make isNaNConstExpr actually constexpr
+        https://bugs.webkit.org/show_bug.cgi?id=236162
+
+        Reviewed by Darin Adler.
+
+        * wtf/MathExtras.h:
+        (WTF::isNaNConstExpr): Add missing constexpr.
+
+2022-02-04  Sam Weinig  <wei...@apple.com>
+
         Gradients don't correctly interpolate missing/none color components correctly
         https://bugs.webkit.org/show_bug.cgi?id=236025
 

Modified: trunk/Source/WTF/wtf/MathExtras.h (289147 => 289148)


--- trunk/Source/WTF/wtf/MathExtras.h	2022-02-05 03:30:56 UTC (rev 289147)
+++ trunk/Source/WTF/wtf/MathExtras.h	2022-02-05 04:04:21 UTC (rev 289148)
@@ -771,7 +771,7 @@
 }
 
 // FIXME: Replace with std::isnan() once std::isnan() is constexpr.
-template<typename T> typename std::enable_if_t<std::is_floating_point_v<T>, bool> isNaNConstExpr(T value)
+template<typename T> constexpr typename std::enable_if_t<std::is_floating_point_v<T>, bool> isNaNConstExpr(T value)
 {
 #if COMPILER_HAS_CLANG_BUILTIN(__builtin_isnan)
     return __builtin_isnan(value);
@@ -780,7 +780,7 @@
 #endif
 }
 
-template<typename T> typename std::enable_if_t<std::is_integral_v<T>, bool> isNaNConstExpr(T)
+template<typename T> constexpr typename std::enable_if_t<std::is_integral_v<T>, bool> isNaNConstExpr(T)
 {
     return false;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to