Fix Linxu build

This commit is contained in:
Wojtek Figat
2021-05-14 11:23:05 +02:00
parent 42461f1b4a
commit 303b9da684

View File

@@ -44,6 +44,7 @@
#include <atomic>
#include <assert.h>
#include <cstddef>
#include <stdint.h>
#include <stdlib.h>
#include <type_traits>
@@ -156,7 +157,11 @@ namespace details {
: static_cast<T>(-1);
};
typedef std::max_align_t std_max_align_t;
#if defined(__GLIBCXX__)
typedef ::max_align_t std_max_align_t; // libstdc++ forgot to add it to std:: for a while
#else
typedef std::max_align_t std_max_align_t; // Others (e.g. MSVC) insist it can *only* be accessed via std::
#endif
// Some platforms have incorrectly set max_align_t to a type with <8 bytes alignment even while supporting
// 8-byte aligned scalar values (*cough* 32-bit iOS). Work around this with our own union. See issue #64.