dimanche 19 juillet 2015

Cannot deduce the "auto ia2(ia)" while ia is an array

I am using CLion 1.05,

int main() {
    int ia[] = {0, 1, 2, 3, 4};
    auto ia2(ia);
    auto ia3(&ia[0]);
    return 0;
}

Clearly, ia2 and ia3 point to the same address, and the code works well. However, the Cloin seems cannot deduce ia2 correctly, and underlines the auto ia2(ia) to be red.

Is it a bug in CLion or other issues ?

enter image description here

Aucun commentaire:

Enregistrer un commentaire