Visual studio 2012编译Tbb40关于std::Copy_exception的错误解决
来源:互联网 发布:it管理 编辑:程序博客网 时间:2024/06/07 04:06
问题:编译时出现错误:
d:\tbb40_20120613oss\include\tbb\tbb_exception.h(357) : error C2039: “copy_exception”: 不是“std”的成员
d:\tbb40_20120613oss\include\tbb\tbb_exception.h(357) : error C3861: “copy_exception”: 找不到标识符
搜索结果:http://software.intel.com/en-us/forums/showthread.php?t=105837
Visual Studio 2012
I'm trying out the release candidate of Visual Studio 2012. tbb_exception.h does not compile due to use of std::copy_exception(). I'm having a hard time finding any info on this method. Is it really part of the std namespace? Will VS2012 be supported soon?
Thanks,
Paul
Rate
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Hello, you are right,
the issue is the same for clang (http://software.intel.com/en-us/forums/showthread.php?t=102603&o=a&s=lr), C++x0 std::copy_exception was renamed to std::make_exception_ptr in final version of C++11 standard. So you need to either rename it in the header or define /DTBB_USE_CAPTURED_EXCEPTION=1 to not use exception_ptr like for old compilers.
We are working on how is better to support both cases at once (i.e. vs2010 and vs2012).
thanks for the report
--Vladimir
Update - details on the issue:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#1130
Rate
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Please login to rate! Current Score: 0 out of 0 users
Quoting paul3579
I'm trying out the release candidate of Visual Studio 2012. tbb_exception.h does not compile due to use of std::copy_exception(). I'm having a hard time finding any info on this method. Is it really part of the std namespace?
I just done verifications with different versions/editions of Visual Studio andMinGW. Here are results:
- Visual Studio 2005 Professional Edition - 'copy_exception' is not supported
- Visual Studio 2008 Express Edition - 'copy_exception' is not supported
- Visual Studio 2010 Express Edition - 'copy_exception' is supported in 'exception' header file
- MinGW v3.4.2 - 'copy_exception' is not supported
I don't think that Microsoft will remove that support in Visual Studio 2012.
简单解决办法(可能不规范):
更改该.h中
tbb_exception_ptr ( const captured_exception& src ) : my_ptr(std::copy_exception(src)) {}
为
tbb_exception_ptr ( const captured_exception& src ) : my_ptr(NULL) {}
问题解决,但可能爆异常时有问题!
- Visual studio 2012编译Tbb40关于std::Copy_exception的错误解决
- 关于Visual Studio c#程序.netframework错误的解决记录
- Visual Studio编译错误
- Visual Studio 2012 编译错误C4996的解决方案
- Visual Studio 2012 出现关于ActivityLog.xml错误的解决方案
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译 multi-byte character set MFC程序出现 MSB8031 错误的解决办法
- 关于Visual Studio 2013 编译多字节字符集的解决方法
- Windows Server 2012安装Visual Studio 2015时错误解决
- Visual Studio 2010 出现关于ActivityLog.xml错误的解决方案
- Visual Studio 2010 出现关于ActivityLog.xml错误的解决方案
- Visual Studio 出现关于ActivityLog.xml错误的解决方案
- mysql学习笔记
- linux c语言连接MySQL数据库
- 下载Android4.1源码
- PHP中全等(===)和相等(==)的区别
- 在程序中进行make以后出现的一些错误以及解决方法
- Visual studio 2012编译Tbb40关于std::Copy_exception的错误解决
- JSP页面获取数据库中BLOB字段生产图片
- Ubuntu静态IP设置
- c++中new和delete的使用方法
- 崔玉松博客
- 编译内核模块的Makefile中的($(KERNELRELEASE),)是什么意思?
- 识别操作系统版本
- eclipse正则表达式批量查找替换
- jQuery选择器的一些使用心得