Swarm-NG  1.1
Unroller< Begin, End, Step > Struct Template Reference

Template helper for unrolling of loops This template helper is used for unrolling loops This and the template specialization below provide a pattern matching recursive function that is evaluated at compile time and generates code for unrolling a function. More...

#include <helpers.hpp>

Detailed Description

template<int Begin, int End, int Step = 1>
struct Unroller< Begin, End, Step >

Template helper for unrolling of loops This template helper is used for unrolling loops This and the template specialization below provide a pattern matching recursive function that is evaluated at compile time and generates code for unrolling a function.

Parameters
Beginthe index to start from
Endthe end index (non-inclusive)
Stepthe step parameter (defaults to 1)

Usage:

This generates a code like:

action( 2 );
action( 4 );
action( 6 );

;

Definition at line 56 of file helpers.hpp.


The documentation for this struct was generated from the following file: