I have some callback functions :
class someclass
{
private:
bool someCB1(GdkEventFocus*,GtkEntry*);
template<class T> bool someCB2(GdkEventFocus*,T*);
};
somewhere in the code of someclass
I have a Gtk::Entry* entry
. If I connect someCB1
:
entry->signal_focus_out_event().connect( sigc::bind<Gtk::Entry*>( sigc::mem_fun( this, &someclass::someCB1 ), entry ) );
this one works, but in my case I want to use someCB
with different kinds of Gtk::Widget
, so I wrote the template function someCB2
to connect someCB2
I wrote :
entry->signal_focus_out_event().connect( sigc::bind<Gtk::Entry*>( sigc::mem_fun( this, &someclass::someCB2 ), entry ) );
this line failed at the compilation, errors are very numerous (I cannot scroll my console to the first one, but the last ones are similar, so I guess like the rest). Here the last one :
/usr/include/sigc++-2.0/sigc++/functors/mem_fun.h:6356:1: note: template argument deduction/substitution failed:
/home/user/chicken.cc:158:111: note: couldn't deduce template parameter ‘T_arg1’
entry->signal_focus_out_event().connect( sigc::bind<Gtk::Entry*>( sigc::mem_fun( this, &someclass::someCB2 ), entry ) );
can someone tells me what I mess ?