最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
google-breakpad在C++ 11下编译错误修改
时间:2015-01-28 编辑:简简单单 来源:一聚教程网
我只用到了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
#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来声明类型,所以做了兼容
相关文章
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24
- C语言中atoi函数模拟实现介绍 10-18
- .Net反向代理组件Yarp用法介绍 10-10
- .NET使用YARP通过编码方式配置域名转发实现反向代理教程 10-10