|
Boost : |
From: Peter Bindels (dascandy_at_[hidden])
Date: 2006-11-10 06:53:51
On 09/11/06, Guy Peleg <guy.peleg_at_[hidden]> wrote:
> Is there any interest in a library which unrolls loops when traversing N
> times through containers? (where N is known in compile time)
> // Specialization 2 ('stop condition'):
>
> template <typename IT>
>
> struct fixed_size_for_each_impl<IT, 1>
>
I would modify this to a 0-based recursion that does nothing. That
way, for_each also works with defines or compile-time constants that
could equal 0, such as temporarily removing some functionality could
normally do.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk