mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-10-31 03:16:25 +08:00
Allow fast-math builds by conditionally avoiding std::numeric_limits<T>::infinity() (fixes #397)
Authored and verified with ByteAsk (https://byteask.com).
This commit is contained in:
parent
0de7a21da5
commit
c212ef1a70
@ -61,8 +61,13 @@ from_chars_result_t<UC>
|
||||
} else {
|
||||
answer.ptr = first + 3;
|
||||
}
|
||||
#if defined(__FAST_MATH__) || defined(FASTFLOAT_FAST_MATH)
|
||||
value = minusSign ? -std::numeric_limits<T>::max()
|
||||
: std::numeric_limits<T>::max();
|
||||
#else
|
||||
value = minusSign ? -std::numeric_limits<T>::infinity()
|
||||
: std::numeric_limits<T>::infinity();
|
||||
#endif
|
||||
return answer;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user