J
Juha Nieminen
I'm trying to do this:
auto values[] = { { 1, 2, 3 }, { 4, 5, 6 } };
but gcc 4.6 is giving me the error:
error: unable to deduce 'std::initializer_list<auto>' from '{{1, 2, 3}, {4, 5, 6}}'
If I make a small change, it doesn't help:
auto values = { { 1, 2, 3 }, { 4, 5, 6 } };
(the same error is issued.)
Is this because the above code is invalid, or because gcc 4.6 doesn't
yet work properly with such constructs?
Note that this compiles and works as expected:
auto values = { { 1, 2, 3 } };
auto values[] = { { 1, 2, 3 }, { 4, 5, 6 } };
but gcc 4.6 is giving me the error:
error: unable to deduce 'std::initializer_list<auto>' from '{{1, 2, 3}, {4, 5, 6}}'
If I make a small change, it doesn't help:
auto values = { { 1, 2, 3 }, { 4, 5, 6 } };
(the same error is issued.)
Is this because the above code is invalid, or because gcc 4.6 doesn't
yet work properly with such constructs?
Note that this compiles and works as expected:
auto values = { { 1, 2, 3 } };