Because this is quite obviously a bug in the compiler itself, all I can do is create a workaround to achieve the same effect.
I removed the default arguments and used an overloaded method as follows:
template<typename T> inline void set_func() {this->f=bar::foo<T>;}
template<typename T> inline void set_func(void(*f)()) {this->f=f;}