Is it possible to decide in run-time which template function to call? Something like:
template struct A { static void foo() {/*...*/} }; vo
No, templates are a compile-time feature, and i is not known at compile-time so this is impossible. A::foo() should be adapted to something like A::foo(i).
i
A::foo()
A::foo(i)