google-breakpad在C 11下编译错误修改
我只用到了exception_handler模块,暂时还未用到Server模块,因为用到了C 11的一些特性,而google-breadpad还没有C 11版本,所以做了一些修改,集中在类型定义处
1.
typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t;
修改为
#if __cplusplus > 199711L
typedef std::remove_reference<decltype(((struct user*) 0)->u_debugreg[0])>::type debugreg_t;
#else
typedef typeof(((struct user*) 0)->u_debugreg[0]) debugreg_t;
#endif
2.
typedef typeof(((elf_aux_entry*) 0)->a_un.a_val) elf_aux_val_t;
修改为
#if __cplusplus > 199711L
typedef decltype(((elf_aux_entry*) 0)->a_un.a_val) elf_aux_val_t;
#else
typedef typeof(((elf_aux_entry*) 0)->a_un.a_val) elf_aux_val_t;
#endif
因C 11中用了decltype来声明类型,所以做了兼容
您可能感兴趣的文章:
google-breakpad在C 11下编译错误修改
win2003 asp.net权限设置问题及解决方法
go语言和python哪个难
网站收录被google的原因是什么?
php错误Undefined variable: 如何解决
MicrosoftVBscript运行时错误
C 错误处理
C 预处理器
php 编程规范变量赋值方法
如何正确理解PHP的错