[sigc] templates and my problem



Dear all,

I have 2 question: a. about the libsigc b. about (this) word and typeof
or decltype
I have NetworkSocket class and coded in main() func such as the
following:
///////////////////////////////////
NetworkSocket *oo = new NetworkSocket();
oo->ready.connect(sigc::ptr_fun(&NetworkSocket::createThread));
oo->run();
///////////////////////////////////////
Above code get the following error:
/////////////////
error: no matching function for call to ‘ptr_fun(bool (NetworkSocket::*)())’
////////////////

When i comment the above code , and put the following code in constructor :
//////////////////////////////////////
typeof(this) sig = new NetworkSocket();
sig->ready.connect(sigc::ptr_fun(createThread));
this->run();
////////////////////////////////////////
I get the following error:
////////////////////////////////
error: no matching function for call to ‘ptr_fun(<unresolved overloaded function type>)’
////////////////////////////////
So , i think g++ can't understand type of this reserverd word.And i don't understand no match call function.

Yours,
Mohsen  

Attachment: signature.asc
Description: This is a digitally signed message part



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