Skip to content

Commit 5d15267

Browse files
committed
Use alignas when building for C++17
1 parent b8e0ea2 commit 5d15267

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Inc/DirectXMath.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@
152152
#include <stdint.h>
153153
#pragma warning(pop)
154154

155-
#ifdef __GNUC__
155+
#if __cplusplus >= 201703L
156+
#define XM_ALIGNED_DATA(x) alignas(x)
157+
#define XM_ALIGNED_STRUCT(x) struct alignas(x)
158+
#elif defined(__GNUC__)
156159
#define XM_ALIGNED_DATA(x) __attribute__ ((aligned(x)))
157160
#define XM_ALIGNED_STRUCT(x) struct __attribute__ ((aligned(x)))
158161
#else

0 commit comments

Comments
 (0)