
10 Nov
2006
10 Nov
'06
11:53 a.m.
On 09/11/06, Guy Peleg <guy.peleg@amdocs.com> 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.