#include struct foo { int i; int j; int k; }; int main() { std::vector v(1); v[0] = {0, 0, 0}; return 0; }
Brace-initialization for aggregates is only valid during declaration-initialization:
Foo a = { 1, 2, 3 };
It is not a way to generate temporaries midway: some_function(true, {1,2,3}, 'c').
some_function(true, {1,2,3}, 'c')
C++11 adds uniform initialization in which you can indeed write f(Foo{1,2,3});.
f(Foo{1,2,3});