#include <helpers.hpp>
Suppose that you define T as:
template<int N> struct T { B choose(P p) { // do something with p return B( ... ); } }
and you want to instantiate T for a finite set of values of N like 1,2,3,4. and you want to call the appropriate T at runtime based on n that is provided at runtime. You will write:
B b = choose< T, 1, 4, B, P>( n, p );
This will try to instantiate T for values 1 to 4 and calls T::choose with p for appropriate value of n at runtime. Note that if n is not in range then it returns B().
Definition at line 98 of file helpers.hpp.