Use std::isnan over self-inequality check
This commit is contained in:
parent
8739e21e6a
commit
b15b56041d
@ -161,7 +161,7 @@ inline Emitter& Emitter::WriteStreamable(T value) {
|
||||
if (std::is_floating_point_v<T>) {
|
||||
if ((std::numeric_limits<T>::has_quiet_NaN ||
|
||||
std::numeric_limits<T>::has_signaling_NaN) &&
|
||||
value != value) {
|
||||
std::isnan(value)) {
|
||||
special = true;
|
||||
stream << ".nan";
|
||||
} else if (std::numeric_limits<T>::has_infinity) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user