Is it possible to decide in run-time which template function to call? Something like:
template struct A { static void foo() {/*...*/} }; vo
Template argument must be known at compile time. So there is no way for compiler to pass A::foo().
A::foo()
If you want work around then you have to make bar() also a template:
bar()
template
template void bar() { A::f(); // ok }
For that, you must know argument to bar() at compile time.