【Linux】解决"no member named 'max_align_t'
编译遇到错误:
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1/../../../../include/c++/5.4.1/cstddef:51:11: error: no member named 'max_align_t' in the global namespace using ::max_align_t;
修改头文件stddef.h:
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; #define __CLANG_MAX_ALIGN_T_DEFINED #endif