Hello,
Compiling the following piece of code produces unnecessary warnings (warning #175: subscript out of range) with icpc version 13.0.0 (gcc version 4.6.3 compatibility), could you please tell me why ? Template parameters are evaluated at compile time before code generation right ?
template<int T> void fun() {
int foo[2 + (T == 0)];
if(T == 0)
foo[2] = 2;
else
foo[1] = 2;
}
int main()
{
fun<2>();
fun<0>();
}




