[sigc] Requiring sigc::trackable (moved from 1.2 to 2)



Hi,

 

I recently moved from libsigc 1.2 to libsigc 2 (yes, I know) and one thing I’ve run into a couple of times already is the following: in 1.2, if you constructed a slot with a member function of an object that wasn’t derived from SigC::Object, you’d get a compiler error. In v2, if you don’t derive from sigc::trackable, you get a crash at run time when the timing of object destruction/disconnect falls the wrong way.

 

So my question: is there a way to enforce at compile time that objects that have a member function connected to a slot be derived from sigc::trackable? Thanks.

 

cheers,

 

Roel

 



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