Metafunction
Loop
Metafunction returning a function that iterates over a static integer range.
Include Headers
seqan/basic.h
Parameters
A worker | |
The upper limit for the iteration. | |
The argument to be passed into the workers' |
Remarks
The loop will go from 1 up to and including I .
Examples
Print the values 1, 2, ..., I-1 , I .
{
static inline void body(Nothing & arg, int I)
{
(void)arg; // ignored
printf("%d\n", I);
}
};
Loop<PrintWorker, 10>::run(Nothing());
// This will print the numbers 1, 2, ..., 9, 10.
See Also
SeqAn - Sequence Analysis Library - www.seqan.de