vendredi 5 août 2016

Is for (auto& a : a) grammatically right?

For example, I defined an multidimensional array

array<array<array<int, 3>, 4>, 5> a;

And I loop it

for (auto& a : a) 
    for (auto& a : a)
        for (auto& a : a) 
            a = 1;

Is that right in grammar? I tested in VS2015. No compilation errors.

Aucun commentaire:

Enregistrer un commentaire