In C++11, when a type T
is an aggregate type, initialisation using { ... }
performs aggregate initialisation. Aggregate initialisation always initialises the members of T
, not T
itself.
Although this is exactly what the standard requires, this is unwanted, which is why in a future standard, the rule will likely be changed to make a special exception for initialisation from the same type. This is core language issue 1467.
Until that time, unfortunately, the error you are getting is entirely correct, and you will have to work around it.