Pongo aquí trozos de código.
Código
class WidgetConnect { public: WidgetConnect(); template <class Class> void Connect(void(Class::*function)()); };
Código
...
template <class Class> void WidgetConnect::Connect(void(Class::*function)()) { //function(); }
Código
WidgetConnect WC; WC.Connect(&Button::test);
me sale el error In function `ZN4Game3RunEv':|
undefined reference to `void WidgetConnect::Connect<Button>(void (Button::*)())'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 3 seconds) ===|
--------------------------------------------
Solución ---->http://stackoverflow.com/questions/10632251/undefined-reference-to-template-function