Re: unresolved overloaded function signal



Paulo Flabiano Smorigo schrieb:
Hi everyone,

I have a signal in my code like this:

button.signal_clicked().connect(sigc::bind<int>( sigc::mem_fun(*this, &Red::setNumber), 1));

And two overloaded functions:

void Red::setNumber(int value);
void Red::setNumber(char* value);

When compile gives me an "unresolved overloaded function signal" error.

How can I fix this?

By specifying the member function's argument type to mem_fun<>:
button.signal_clicked().connect(sigc::bind(sigc::mem_fun<int>(*this, &Red::setNumber), 1));


Klaus Triendl


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]