forked from OctaForge/libostd
some platforms' C libs don't have max_align_t
parent
c388e8c09a
commit
8557b0abe1
|
@ -875,7 +875,7 @@ namespace octa {
|
|||
template<size_t N> struct AlignedStorageTest {
|
||||
union type {
|
||||
uchar data[N];
|
||||
max_align_t align;
|
||||
octa::max_align_t align;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#define OCTA_TYPES_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
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
|
Loading…
Reference in New Issue