The KISS version...
for (int _i = 0; _i < 10; ++_i) {
const int i = _i;
// use i here
}
If your use case is just to prevent accidental modification of the loop index then this should make such a bug obvious. (If you want to prevent intentional modification, well, good luck...)