A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
cmath build errors with VS2019 C++
I have some C++ code that I can build with VS2015 and VS2017 but not with VS2019. I am getting build errors with cmath. I did a compare between the cmath file in VS2017 (MSVC 14.16.27023) and the cmath file in VS2019 (MSVC 14.29.30133) and there are many differences. As an example:
VS2017 cmath:
_Check_return_ inline float acos(In float _Xx) noexcept
{
return (_CSTD acosf(_Xx));
}
VS2019 cmath:
_NODISCARD _Check_return_ inline float acos(In float _Xx) noexcept /* strengthened */ {
return _CSTD acosf(_Xx);
}
I am getting the following errors for this line:
C2589: '(': illegal todken on right side of '::'
C2062: type 'unknown-type' unexpected
C2059: syntax error: ')'
I am postulating that it may have something to do with the different parenthesis used between the two files. I also get this error for the asinf, atanf, atan2f, cosf, expf, fabsf, fmodf, logf, log10f, powf, sinf, sqrtf, and tanf.