The compiler throws no warnings or errors for the following code. Is the meaning of the const qualifier being abused? Obviously I cannot reassign it later in the same loop iteration but it does seem to reassign it after each iteration.
Sample code:
for(int i = 0; i < 10; ++i)
{
const int constant = i;
}