【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

  

全部评论

相关推荐

11-03 13:18
门头沟学院 Java
包行:平时怎么刷算法题的哇,字节的手撕听说都很难
字节跳动工作体验
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务