use the type "slot_type" that is declared inside your signal type
class Foo
{
public:
typedef boost::signal0<void> Signal;
typedef Signal::slot_type Slot;
void AddHandler(Slot handler)
{
m_signal.connect(handler);
}
private:
Signal m_signal;
};
void f()
{
std::cout << "f() called";
}
Foo foo;
foo.AddHandler(signal);
foo.AddHandler(&f);
source
share