来自VC++小组的VS2010 Beta 1常见问题报告(1)
2010-05-10 11:25
155 查看
Visual Studio 2010 Beta
1中的VC++对C++0x提供了很多支持,很多标准也与C++0x接轨。这样做的好处是很多的,但同时也会导致以前一些不符合C++0x规范的代码无法
像原来那样工作。以下是VC++小组的相关问题报告。
Visual Studio
2010中的VC++对C++0x提供了很多支持,很多标准也与C++0x接轨。这样做的好处是很多的,但同时也会导致以前一些不符合C++0x规范的代
码无法像原来那样工作。
问题:error C3861: 'back_inserter': identifier not found
解决方法:#include ﹤iterator﹥
问题在于,back_inserter()在没有include
﹤iterator﹥的情况下被使用。C++标准库的headers会通过某种未定义的方式将其他headers包括进来。……VC9
SP1下,include﹤algorithm﹥顺带的就包括了﹤iterator﹥,但在VC10 Beta 1下需要单独写明。
问题
2: error C2664: 'std::vector﹤_Ty﹥::_Inside' : cannot convert parameter 1
from 'IUnknown **' to 'const ATL::CComPtr﹤T﹥ *'
解决方法:使用CAdapt
标准容器禁止其元素将运算符的address-of过载。CComPtr将运算符的address-of过载,导致
vector﹤CComPtr﹤T﹥﹥被禁止。这是因为,在VC9
SP1中,vector并在push_back()中使用不使用运算符的address-of,但在VC10 Beta 1中是使用的。
解
决方法就是使用﹤atlcomcli.h﹥的CAdapt。……
问题3: error C2662:
'NamedNumber::change_name' : cannot convert 'this' pointer from 'const
NamedNumber' to 'NamedNumber &'
解决方法:Respect set Immutability
(尊重set的不变性)
问题4:Specializing stdext::hash_compare
(如
果你为你的type使用非标准话的
﹤hash_set﹥或﹤hash_map﹥,以及特别的stdext::hash_compare,那你会发现这里没法儿用了,因为它们被移到了命名空
间下。 ……)
解决方法:使用 ﹤unordered_set﹥ 或﹤unordered_map﹥
转自:http://developer.51cto.com/art/200905/125567.htm
1中的VC++对C++0x提供了很多支持,很多标准也与C++0x接轨。这样做的好处是很多的,但同时也会导致以前一些不符合C++0x规范的代码无法
像原来那样工作。以下是VC++小组的相关问题报告。
Visual Studio
2010中的VC++对C++0x提供了很多支持,很多标准也与C++0x接轨。这样做的好处是很多的,但同时也会导致以前一些不符合C++0x规范的代
码无法像原来那样工作。
问题:error C3861: 'back_inserter': identifier not found
解决方法:#include ﹤iterator﹥
问题在于,back_inserter()在没有include
﹤iterator﹥的情况下被使用。C++标准库的headers会通过某种未定义的方式将其他headers包括进来。……VC9
SP1下,include﹤algorithm﹥顺带的就包括了﹤iterator﹥,但在VC10 Beta 1下需要单独写明。
问题
2: error C2664: 'std::vector﹤_Ty﹥::_Inside' : cannot convert parameter 1
from 'IUnknown **' to 'const ATL::CComPtr﹤T﹥ *'
解决方法:使用CAdapt
标准容器禁止其元素将运算符的address-of过载。CComPtr将运算符的address-of过载,导致
vector﹤CComPtr﹤T﹥﹥被禁止。这是因为,在VC9
SP1中,vector并在push_back()中使用不使用运算符的address-of,但在VC10 Beta 1中是使用的。
解
决方法就是使用﹤atlcomcli.h﹥的CAdapt。……
问题3: error C2662:
'NamedNumber::change_name' : cannot convert 'this' pointer from 'const
NamedNumber' to 'NamedNumber &'
解决方法:Respect set Immutability
(尊重set的不变性)
问题4:Specializing stdext::hash_compare
(如
果你为你的type使用非标准话的
﹤hash_set﹥或﹤hash_map﹥,以及特别的stdext::hash_compare,那你会发现这里没法儿用了,因为它们被移到了命名空
间下。 ……)
解决方法:使用 ﹤unordered_set﹥ 或﹤unordered_map﹥
转自:http://developer.51cto.com/art/200905/125567.htm
相关文章推荐
- VC++小组的VS2010 Beta 1常见问题报告
- VC中_T、_TEXT和TEXT宏的作用(来自互联网)
- 20135223/20135234/20135229小组——亚博 Arduino智能小车实践报告
- Beta版本发布报告
- VS2010中“工具>选项中的VC++目录编辑功能已被否决”解决方法
- ArcGIS earth 1.0 beta体验报告——给我一个按钮我将转动整个地球
- VS2010 VC Project的default Include设置
- 学术族谱 Beta Release 测试报告
- 关于 GDI+ 在 VC6, VS2005, VS2010 中应用的一点区别 .
- 第14周报告2:计算小组的成绩
- VC++控制台程序使用Mysql,以及和MFC程序的兼容问题,工具VS2010ultimate
- 关于vc 链接时提示转换coff文件失败的【备忘-转载-来自百度知道】
- vs2010 Microsoft Visual Studio 无法加载 DLL“UIAutomationCore.dll”: 找不到指定的程序。 (异常来自 HRESULT:0x8007007F) 错误处理方式
- VS2010 C++/CLR FFMpeg常见问题及解决方案汇总(将于2016.9进行完善)
- 【C++】VS2010生成的程序在安装了vc2010运行库的机器上提示“丢失MSVCR100D.dll”
- vs2010中 vc++ directories全局配置
- Beta版本测试报告
- VS2010旗舰版无法在WIN7上安装VC9.0 runtime 安装失败,折腾了好几个小时了,还没能搞定
- 【实验报告】《数据结构》实验一: VC编程工具的灵活使用
- VC++ 发送邮件(使用邮件进行程序异常报告)