Metafunction
LoopReverse
Metafunction returning a function that iterates over a static integer range in reverse order.
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 I down to and including 1.
Examples
Print the values I , I - 1 , ..., 2, 1.
{
static inline 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