I have a C++ snippet below with a run-time for loop,
for(int i = 0; i < I; i++)
for (int j = 0; j < J; j++)
A( row(i,j), column(i,j)
I would say it is a false good-idea.
In C++ this :
row::value
means you will have as many differents row<>() functions than you have i * j. You don't want this because it will increase the size of the code and do a lot of instruction cache misses.
I observed this when I was doing template functions to avoid a single boolean check.
If is a short function just inline it.