1
0
mirror of https://github.com/microsoft/DirectXMath synced 2024-11-09 14:10:09 +00:00

Use alignas when building for C++17

This commit is contained in:
Chuck Walbourn 2021-01-03 15:15:58 -08:00
parent b8e0ea25f7
commit 5d152671db

View File

@ -152,7 +152,10 @@
#include <stdint.h>
#pragma warning(pop)
#ifdef __GNUC__
#if __cplusplus >= 201703L
#define XM_ALIGNED_DATA(x) alignas(x)
#define XM_ALIGNED_STRUCT(x) struct alignas(x)
#elif defined(__GNUC__)
#define XM_ALIGNED_DATA(x) __attribute__ ((aligned(x)))
#define XM_ALIGNED_STRUCT(x) struct __attribute__ ((aligned(x)))
#else