Skip to content

Commit 5926ee9

Browse files
authored
msvc: fix for including math.h, but not cmath, and then trying to use SIMDe. (#1363)
Fixes: #1304
1 parent ac0ce43 commit 5926ee9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

simde/simde-math.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
103103
* macro libc++ uses. */
104104
#if defined(isnan) || (defined(_LIBCPP_MATH_H) && !defined(_LIBCPP_CMATH))
105105
#define SIMDE_MATH_HAVE_MATH_H
106-
#elif defined(__cplusplus)
106+
#elif defined(__cplusplus) && !defined(HEDLEY_MSVC_VERSION)
107107
#define SIMDE_MATH_HAVE_CMATH
108108
#endif
109-
#elif defined(__has_include)
109+
#endif
110+
#if defined(__has_include) && !(defined(SIMDE_MATH_HAVE_MATH_H) || defined(SIMDE_MATH_HAVE_CMATH))
110111
#if defined(__cplusplus) && (__cplusplus >= 201103L) && __has_include(<cmath>)
111112
#define SIMDE_MATH_HAVE_CMATH
112113
#include <cmath>

0 commit comments

Comments
 (0)