Closed zygoloid closed 2 days ago
Duplicate of #519. Other duplicates: #908, #3400.
This is (partially) fixed by #4537. The remain issue, additional overloads missing in <math.h>
in C++ mode, is out of the scope of this repo. I opened DevCom-10294165 but it was recently closed as Lower Priority...
Yep, @frederick-vs-ja is correct, this is fixed for <cmath>
. #4537 shipped in VS 2022 17.11 Preview 2 which is available now. (Compiler Explorer got actual MSVC compilation and execution back :tada: but is currently limited to 17.8).
Describe the bug
std::isnan
fails to compile when passed an argument of integer type.Command-line test case
results in:
Live on compiler explorer
Expected behavior
<cmath>
is required to provide sufficient additional overloads such thatstd::isnan
can be applied to integer types, with the behavior that the integer value is implicitly converted todouble
(so thatstd::isnan(0)
returns false). This doesn't appear to work under MSVC.