【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

  

上一篇:错误:'class QApplication' has no member named 'setMainwidget'


下一篇:牛客练习赛38 D 题 出题人的手环 (离散化+树状数组求逆序对+前缀和)