- array a <T, N> = {initializer-list}; correct syntax?

In the working draft http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3225.pdf 23.3.2 he says

An array is a collection (8.5.1) that can be initialized using syntax array a<T, N> = { initializer-list };

I would have tt array<T, N> a = { initializer-list };would be correct, can someone explain this odd syntax?

+4
source share
1 answer

The draft is wrong. The final version of the C ++ 11 standard has array<T, N> a, as you would expect.

+4
source

Source: https://habr.com/ru/post/1532563/


All Articles