google-breakpad在C++ 11下编译错误修改
2014-09-29 14:23
543 查看
我只用到了exception_handler模块,暂时还未用到Server模块,因为用到了C++ 11的一些特性,而google-breadpad还没有C++11版本,所以做了一些修改,集中在类型定义处
1.
修改为
2.
修改为
因C++11中用了decltype来声明类型,所以做了兼容
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下编译错误修改
- google-breakpad在C++ 11下编译错误修改
- google-breakpad在 C++11下编译错误 ISO C++ forbids declaration of ‘typeof’ with no type
- C++第六周任务一【任务1】下面的程序存在编译错误。有两种方法可以修改,请给出这两种修改方案,在报告中说明你倾向于用哪一种?为什么?处理此类问题的原则是什么?
- Google Breakpad--VS2015 编译、使用、定位错误(如何使用gyp)
- Google Breakpad--VS2015 编译、使用、定位错误(如何使用gyp)
- C++常见编译错误集
- C++编译过程中常见的一些错误
- c++编译小错误解决2009_10_10(不断增加中)
- google Android编译本地C++程序方法
- 两个C++编译错误及解决办法--does not name a type和field `XX' has incomplete type
- C++常见错误及编译错误汇集
- C++编译错误解决方法
- c++常见编译错误解决方案
- 说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
- Delphi/C++Builder在没有做任何代码修改,重新编译后CRC不一致的解决方案。
- 【转】比较有用的C++编译错误解决方法
- ubuntu9.10使用第一天(教育网直通车+源修改+C++编译环境搭建+输入法安装)
- C/C++编译时的Link.EXE错误问题与解决方法
- 说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。