问题
Recently I have installed Visual Studio 2012. After the installation I updated my IDE with update 3 to guarantee functionality of my programs on Windows XP.
Everything is working well, but I still can not use initializer list and variadic templates! Do I need any extra updates to get this working with Visual Studio 2012?
回答1:
VS2012 does not support variadic templates and initializer lists, even with the latest updates. VS2013 RC, however, supports both.
For a full overview of what C++11 features are supported, see:
http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
回答2:
Or if you really like VS2012 you can try the 2012 Nov CTP - http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx
Note: This CTP (Consumer Technology Preview) has only compiler update, so you can use variadic templates & initializer_lists in your code, but will not find them in the standard library.
来源:https://stackoverflow.com/questions/19080108/visual-studio-2012-update-3-initializer-list-variadic-templates