Skip to content

Commit

Permalink
Avoid isnan/isinf redefine in c++ on VS2013 and above
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieAkeroyd authored and mdavidsaver committed Sep 16, 2024
1 parent 0c4907f commit 101552d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/libcom/src/osi/os/WIN32/epicsMath.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 101552d

Please sign in to comment.