jeudi 1 mai 2014

changer la version C++ dans visual studio - Stack Overflow


How to check the version of C++ in Visual C++ Express Edition 2010 and change it to C++11? I've tried to use uniform initialization like std::vector<std::string> v{"Hello" , "World"};, but it doesn't work.




You cannot change the C++ language version used by Visual Studio 2010. It does have partial support for C++11, but since VS 2010 was released before the C++11 standard was finalized, certain features are not exactly in-line with the standard, and furthermore not all features have been implemented.


See this chart for a list of which C++11 features are supported in various major compilers and the versions at which they became available.




Unfortunatly, that is not implemented in the compiler yet, not even in VS 2012.




Visual C++ does not support uniform initialization at present time. The most recent compiler CTP release (for Visual Studio 2012, not 2010) has support for it, but that is an alpha-quality product. Moreover, there is no standard library support in there yet, so you still wouldn't be able to use uniform initialization with vector.


(In any case, how would you expect C++2011 to be supported on MSVC++2010?)



How to check the version of C++ in Visual C++ Express Edition 2010 and change it to C++11? I've tried to use uniform initialization like std::vector<std::string> v{"Hello" , "World"};, but it doesn't work.



You cannot change the C++ language version used by Visual Studio 2010. It does have partial support for C++11, but since VS 2010 was released before the C++11 standard was finalized, certain features are not exactly in-line with the standard, and furthermore not all features have been implemented.


See this chart for a list of which C++11 features are supported in various major compilers and the versions at which they became available.



Unfortunatly, that is not implemented in the compiler yet, not even in VS 2012.



Visual C++ does not support uniform initialization at present time. The most recent compiler CTP release (for Visual Studio 2012, not 2010) has support for it, but that is an alpha-quality product. Moreover, there is no standard library support in there yet, so you still wouldn't be able to use uniform initialization with vector.


(In any case, how would you expect C++2011 to be supported on MSVC++2010?)


0 commentaires:

Enregistrer un commentaire