>> would it be possible to sort of engineer some sort of preprocessor
>> macro that does a 'for' loop.
[quoted text clipped - 3 lines]
>
> 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...

Signature
Sven Groot
http://unforgiven.bloghorn.com
Carl Daniel [VC++ MVP] - 11 May 2004 23:46 GMT
>>> would it be possible to sort of engineer some sort of preprocessor
>>> macro that does a 'for' loop.
[quoted text clipped - 10 lines]
> I'm certain I've come across a compiler that did that, but I can't
> remember for certain if VC does it though...
I'm not sure if VC does automatic loop unrolling, but there definitely are
compilers that do so.
-cd