
I have a problem with the sematics of the the signal connect method. Consider this simple program: #include <iostream> #include <boost/signal.hpp> struct HelloWorld { void operator()() const { std::cout << "Hello, World!, the parallel world exist at " << (void *) this << std::endl; } }; int main () { // Connect a HelloWorld slot HelloWorld hello; std::cout << "Main world at " << (void *) &hello << std::endl; boost::signal<void ()> sig; sig.connect(hello); sig (); std::cout << "Thats all folks!\n"; return 0; } It produces this output:
Main world at 0xbffff2e0 Hello, World!, the parallel world exist at 0x8056128 Thats all folks!
My problem is that the object signalled is not the same object that I subscribed to the signal. Is this really what was inteded ? Is the any rationale behind this behaviour ? -- Jesper Bojesen Medical Insight Email: jbb@medical-insight.com Phone mobile: (+45) 40 99 55 03 Phone direct: (+45) 46 55 04 42 Fax: (+45) 46 55 11 66