std::vector<int> test { 0x34 };
gives this error:
error expected a ';'
I am using VS2012 which supports this C++11 feature.
std::vector<int> test { 0x34 };
gives this error:
error expected a ';'
I am using VS2012 which supports this C++11 feature.
Your code is perfectly legal in C++11. I must conclude you are not using November 2012's CTP, in which case your assumption:
I am using VS2012 which supports this C++11 feature.
is incorrect. This Q&A on StackOverflow clarifies which features are supported by VC11.
Notice, that uniform initialization is only supported in November 2012's CTP.
And while it is true that November 2012's CTP does introduce support for C++11's uniform initialization in the compiler (see this Q&A on StackOverflow for an overview of what features are supported), the implementation of the standard library which is shipped with VS2012 has not been rewritten to make use of those features (Error when initializing a vector).