I have some function templates, for example
template
void foo(T);
template
void bar(T);
// others
a
Why couldn't you use template template parameters? You said you can't pass your template uninstantiated, but I'm not sure if you've heard of this before, tell me if you have and it won't work.
I don't know what your code structure looks like, but can you do something like
I know this works, don't know if it's what yo uwant though:
template
T some_algorithm(T data) { return T(); } // just returning nothing for example
template
class FuncClass {
public:
T run(T data) { return Something(data); }
};
template
void apply_algorithm(T data) {
Functor F;
F.run(data);
}
int main() {
int mydata = 4;
apply_algorithm > >(mydata);
cin.get();
}