Add static assert: const-eval depends on inf and NaN support

Make this dependence explicit.
Portability of the fail-compile condition requires this.

It's likelty to be clarified in the spec:
https://github.com/gpuweb/gpuweb/issues/4183

Fixed: tint:1966
Change-Id: I3fcd9bcc631941d2567c4c6b6d76401f238fcb7f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/137640
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/builtin/number.h b/src/tint/builtin/number.h
index accc5e2..23b9d0e 100644
--- a/src/tint/builtin/number.h
+++ b/src/tint/builtin/number.h
@@ -274,6 +274,13 @@
 /// However since C++ don't have native binary16 type, the value is stored as float.
 using f16 = Number<tint::detail::NumberKindF16>;
 
+/// The algorithms in this module require support for infinity and quiet NaNs on
+/// floating point types.
+static_assert(std::numeric_limits<float>::has_infinity);
+static_assert(std::numeric_limits<float>::has_quiet_NaN);
+static_assert(std::numeric_limits<double>::has_infinity);
+static_assert(std::numeric_limits<double>::has_quiet_NaN);
+
 template <typename T, utils::traits::EnableIf<IsFloatingPoint<T>>* = nullptr>
 inline const auto kPi = T(UnwrapNumber<T>(3.14159265358979323846));