After installing Visual Studio 2012 Update 2 CTP 4 (March), this code doesn't compile:
安装Visual Studio 2012 Update 2 CTP 4(3月)后,此代码无法编译:
vector<int> b = {1, 2, 3};
with the following error message:
以下错误消息:
'std::vector<_Ty>' : Types with a base are not aggregate
Earlier post about the same issue with previous CTP mentioned using initializer_list header, but CTP 4 didn't install it. Any suggestions how to fix it?
关于使用initializer_list标头的前一个CTP提到的相同问题的早期帖子,但CTP 4没有安装它。任何建议如何解决?
1 个解决方案
#1
1
The compiler supports initializer lists, but the standard library (std::vector etc.) does not. You will have to wait before your line compiles.
编译器支持初始化列表,但标准库(std :: vector等)不支持。你必须在你的线编译之前等待。
#1
1
The compiler supports initializer lists, but the standard library (std::vector etc.) does not. You will have to wait before your line compiles.
编译器支持初始化列表,但标准库(std :: vector等)不支持。你必须在你的线编译之前等待。