Avoid isnan/isinf redefine in c++ on VS2013 and above

This commit is contained in:
Freddie Akeroyd
2024-08-30 11:43:10 +01:00
committed by Andrew Johnson
parent 574fe116fc
commit dd154180bf

View File

@ -19,12 +19,13 @@
#define finite(D) _finite(D)
#endif
#ifndef __cplusplus
#if !defined(__cplusplus) || (defined(_MSC_VER) && (_MSC_VER < 1800))
/* these are macros in C but inline functions in C++
* so ifndef does not work as a check in c++
* and in a recent VS2022 update causes a conflict and
* compile time error
/* these are macros in C but usually inline functions in C++
* so macro ifndef does not work as a check in c++
* In a recent VS2022 update redefining as macros causes a conflict and
* compile time error. It looks like VS2013 and above supply
* isnan and isinf functions for in C++ so no need to create them
*/
#ifndef isnan