vs2015 Open vs2013 project c2338 "C++ Standard forbids containers of const elements

"The C++ Standard forbids containers of const elements "
        "because allocator<const T> is ill-formed.");

The code looks for the definition in the C2535 vector, and then removes the const in the vector template .

Because it is used in the STL container template const, it is forbidden in the C++11 standard! The old version of Visual Studio is not so strict, so it can generally be compiled

 

Guess you like

Origin blog.csdn.net/txwtech/article/details/114536832