Skip to content

Commit c784bd2

Browse files
committed
Fix build with Clang on Windows
1 parent 2aceb7a commit c784bd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/xsimd/config/xsimd_inline.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#ifndef XSIMD_INLINE_HPP
1313
#define XSIMD_INLINE_HPP
1414

15-
#if defined(__GNUC__)
15+
// When using Clang on Windows, Clangs defines _MSC_VER instead of __GNUC__
16+
// and selecs a version it does not support.
17+
#if defined(__GNUC__) || (defined(_MSC_VER) && defined(__clang__))
1618
#define XSIMD_INLINE inline __attribute__((always_inline))
1719
#elif defined(_MSC_VER)
1820
#define XSIMD_INLINE inline __forceinline

0 commit comments

Comments
 (0)