c++11 introduced Uniform Initialization Syntax as an explicit way to work around the Most Vexing Parse.
I believe http://en.cppreference.com refers to it as Direct List Initialization.
Anyway whatever you call it it doesn't seem to work in visual-studio-2012. Given this example:
istringstream foo("192 168 1 1");
const vector<int> bar{ istream_iterator<int>(foo), istream_iterator<int>() };
cout << bar.front() << endl;
I get the error:
error C2601:
bar
: local function definitions are illegal
If I instead do: const vector<int> bar(istream_iterator<int>(foo), istream_iterator<int>());
I get the error:
error C2228: left of
.front
must have class/struct/union
I can work around this with the pre-c++11 workaround: const vector<int> bar((istream_iterator<int>(foo)), istream_iterator<int>());
But I find it frustrating. Is Uniform Initialization Syntax not implemented for visual-studio-2012?