I want to write a templated function and explicitly instantiate it inside extern "C" block to avoid code duplication.
Here is example of what I mean:
template<typename T> // my templated function
T f(T val){
return val;
}
extern "C"{
int f_int(int val) = f<int>; // this does not compile, but this is what I want to achieve
}