I just upgraded to Intel C++ version 18.0.1 and discovered that cmath is apparently broken. The simple program
#include <cmath>
int main(int argc,char **argv)
{
double x = 0.0/0.0;
if (std::isnan(x)) return 0;
else return 1;
}
will not compile (it would for previous versions of Intel and works fine for GNU). The error message I get is
icpc isnan.cc
isnan.cc(5): error: expected an identifier
if (std::isnan(x)) return 0;
I get the same error for other floating point checks like std::isfinite().