Older compilers allowed this kind of "blasphemy"
int a[5]; 4[a] = 3;
Simply because operator[] would allow const expression and those are equal:
*(4 + a) === *(a + 4)
Is that a defined behavior or an UB in C++11?
Aucun commentaire:
Enregistrer un commentaire