16 Apr
2003
16 Apr
'03
1:51 p.m.
On Wednesday 16 April 2003 08:26 am, Jesper Bojesen wrote:
My problem is that the object signalled is not the same object that I subscribed to the signal.
Is this really what was inteded ?
Yes.
Is the any rationale behind this behaviour ?
Yes. In STL, function objects are copied around at will, so Signals picks up that part of the function object concept. If you want Signals to keep a reference to a function object (instead of making a copy), use boost::ref: sig.connect(boost::ref(hello)); Doug