Use alignas when building for C++17

This commit is contained in:
Chuck Walbourn 2021-01-03 15:15:58 -08:00
Родитель b8e0ea25f7
Коммит 5d152671db
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -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