someone already asked this question, but the thread ended up in the original question, but received no answer.
suppose you have this:
template<size_t i, class f_type>
void call_with_i(f_type f);
functor_type:
a) struct with a method that has the following signature:
template<size_t i> operator()() const;
or, b) a function that looks like this:
template<size_t i> foo();
Strike>
I want "call_with_i <42> (foo)" to be equivalent to "foo <42> ()", but I cannot figure out the correct syntax for this to happen. I would be satisfied with a solution that only makes (a) , but (a) + (b) would be great . I have already tried these syntaxes:
f< i >();
f()< i >;
f.operator< i >();
f.operator()< i >;
f.operator()< i >();
How do you call operator () with explicit template arguments? Is there a way to call it so that the same syntax also calls a template free function?
p.s. , , , repeat_to, repeat_to < 10 > (f) f (0), f (1)... f (10). boost:: fusion . , , -, .
: , .