diff --git a/octa/traits.h b/octa/traits.h index 1741272..7027972 100644 --- a/octa/traits.h +++ b/octa/traits.h @@ -875,7 +875,7 @@ namespace octa { template struct AlignedStorageTest { union type { uchar data[N]; - max_align_t align; + octa::max_align_t align; }; }; }; diff --git a/octa/types.h b/octa/types.h index 4794b0d..8b287da 100644 --- a/octa/types.h +++ b/octa/types.h @@ -7,6 +7,7 @@ #define OCTA_TYPES_H #include +#include namespace octa { typedef signed char schar; @@ -20,6 +21,12 @@ namespace octa { typedef long double ldouble; typedef decltype(nullptr) nullptr_t; + +#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) + using ::max_align_t; +#else + typedef long double max_align_t; +#endif } #endif \ No newline at end of file