Visual studio 2012编译Tbb40关于std::Copy_exception的错误解决

news/2024/7/5 23:55:15 标签: exception, login, express, microsoft, include, header

问题:编译时出现错误:

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
 

header thread-col" width="30%" align="left">Vladimir Polin (Intel)header thread-col" width="30%" align="left">June 8, 2012 11:28 PM PDTheader last-post-title" width="20%">
Rate
 
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
header last-post-date" width="20%" align="right">#1
Visual Studio 2012

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
 

header thread-col" width="30%" align="left">Sergey Kostrovheader thread-col" width="30%" align="left">June 9, 2012 4:22 PM PDTheader last-post-title" width="20%">
Rate
 
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
login to rate! Current Score: 0 out of 0 users"> Please login to rate! Current Score: 0 out of 0 users
header last-post-date" width="20%" align="right">#2
Visual Studio 2012

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 and MinGW. 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) {}

问题解决,但可能爆异常时有问题!


http://www.niftyadmin.cn/n/719476.html

相关文章

react前端框架dva(二)

dva的8个基础概念:数据流向数据的改变发生通常是通过用户交互行为或者浏览器行为(如路由跳转等)触发的,当此类行为会改变数据的时候可以通过 dispatch 发起一个 action,如果是同步行为会直接通过 Reducers 改变 State …

java实现文件复制粘贴功能

java编程思想中讲到了IO流的思想,以前对于java基础总是不够深入,浅尝辄止,如今碰到语句插桩的时候就感到书到用时方恨少啊! 文件的复制涉及到源文件和新文件(无需手动创建),给出源文件的路径和文…

react前端框架dva(三)

API 输出文件 dva 默认输出文件。 dva/router 默认输出 react-router 接口, react-router-redux 的接口通过属性 routerRedux 输出。 比如:import { Router, Route, routerRedux } from dva/router;dva/fetch 异步请求库,输出 isomorphic-fet…

Plone中用户、组和权限管理

Users, Groups, and Permissions 来源:http://weblion.psu.edu/services/documentation/bootcamp-beginners/users-groups-permissions Controlling who can do what on your Plone siteAlso available in presentation mode… Users Anonymous Those who cannot l…

获取记录集中不同组的特定记录

/****** Script for SelectTopNRows command from SSMS ******/ /**求序列号([Serial])相同,编号([Num]主键)最大者的记录**/SELECT [Num] --主键,[Serial],[Depart],[Time] --非主键(不同序列号的时间可能相同)FRO…

pronunciation from Longman

1. as England 中有个schwa as old as I am 前一个as 是schwa 后一个和d连读发梅花音 2 make your presence felt 3 almost 4 excellence 5 performance 6 dramatically 第一个a是schwa 第二个是fan 值得注意的是第三个a不发音,它的音标是/drəˈmtɪkli/ 7 spend …

react前端框架dva(四)

dva.js 知识导图 不知大家学 react 或 dva 时会不会有这样的疑惑: es6 特性那么多,我需要全部学会吗?react component 有 3 种写法,我需要全部学会吗?reducer 的增删改应该怎么写?怎么做全局/局部的错误处理?怎么发异步请求?怎么处理复杂…

解决方案:Oracle导入DMP文件后,注释和CLOB字段乱码

2019独角兽企业重金招聘Python工程师标准>>> 这两天在公司,遇到奇怪的问题: 从一个oracle数据库导出带有CLOB字段表的DMP文件,然后再导入进另一个Oracle数据库,数据中除了CLOB字段中的中文,其他都是正常的…