"The C++ Standard forbids containers of const elements "
"because allocator<const T> is ill-formed.");
代码查找C2535 vector里面的定义,然后把vector模板里面的const去掉。
因为在STL容器模板中使用了const
,在C++11的标准里,这是禁止的!而老版本的Visual Studio并没有这么严格,所以一般可以编译过
"The C++ Standard forbids containers of const elements "
"because allocator<const T> is ill-formed.");
代码查找C2535 vector里面的定义,然后把vector模板里面的const去掉。
因为在STL容器模板中使用了const
,在C++11的标准里,这是禁止的!而老版本的Visual Studio并没有这么严格,所以一般可以编译过