In this trivial example, test2 fails to compile even though test1 succeeds, and I don\'t see why that is the case. If arr[i] is suitab
test2
test1
arr[i]
Because arr[i] is not compile-time constant expression. It can be different at run-time.