Carl Daniel [VC++ MVP] wrote:
songie D wrote: would it be possible to sort of engineer some sort of preprocessor
macro that does a 'for' loop.
i.e. for where you would normally use a normal for loop, but when it
is known ay compile time whay the variable is, hence unrolling the
loop.
http://www.boost.org/libs/preprocessor/doc/index.html
Doesn't VC already do this with a normal for-loop when optimising for speed,
the number of iterations can be determined at compile time, and the amount
of inserted code is reasonable small?
I'm certain I've come across a compiler that did that, but I can't remember
for certain if VC does it though...
--
Sven Groot
http://unforgiven.bloghorn.com