Bugzilla – Bug 23
Callbacks cannot be created for member methods and Ptr<T> object instances
Last modified: 2008-07-01 13:32:13 UTC
the following code will not compile: Ptr<MyObject> p; MakeCallback (&MyObject::MyMethod, p); The solution probably would require us to define a CallbackTraits<T> template class and specialize it for the Ptr class: template <typename T> struct CallbackTraits { typedef T * PointerType; }; template <> struct CallbackTraits<Ptr> { typedef Ptr<T> PointerType }; and use CallbackTraits<T>::PointerType in callback.h wherever we use T *.