AMDG Boris wrote:
On Tue, 15 Jan 2008 19:30:00 +0200, raimar wagner
wrote: Hello! I'm trying to use the boost signals library to implement a callback system, but my first test-application (see boost_test_app.cpp in attachment) won't compile. The connect method works as expected, but if I'm trying to disconnect my slot (in line 28: " mySignal.disconnect(slot);") a compiler error message appears.
This reminds me of bug #1076 - see http://svn.boost.org/trac/boost/ticket/1076 (although that bug was reported for Visual Studio).
It's somewhat different though in that there is no way to make this work correctly. Try making Button::unregisterCallback a template template<class T> void unregisterCallback(const T& slot) { mySignal.disconnect(slot); } In Christ, Steven Watanabe