vs2015打开vs2013项目c2338“C++ Standard forbids containers of const elements

"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并没有这么严格,所以一般可以编译过

猜你喜欢

转载自blog.csdn.net/txwtech/article/details/114536832
今日推荐