Bonjour
Dans la norme 14882, on a à la clause 3.4.1.13:
In particular, the function parameter names shall not be redeclared in the exception-declaration nor in the outermost block of a handler for the function-try-block.
Or, sauf erreur de ma part, on a bien i qui est redéfinie ici:
Donc est ce que cela signifie que le compilateur ne voit pas l'erreur?
alors que ceci compile bien pas :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 void fdf( int o=1,int u=2 ) try { int o=1; } catch (const int &i) { int o=1; }
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 void fdfs( int o,int u ) { // int o=1; }
Partager