28 Mar
2003
28 Mar
'03
7:41 p.m.
I am trying to create a simple mechanism to register multiple callbacks with my class. My first simple-minded approach is to use std::list< boost::function2< [my params]> > Unfortunately, I cannot search this list to unregister callbacks, as any attempt to dereference a list::iterator tries to call the function, rather than return the function object. After spotting this problem in the standard algorithms I have been trying to hack around myself, explicitly calling operator* and even operator-> with no joy. Am I missing some easy way to get the function object out of the iterator as a value? And is this a bug in my compiler (BCB6) or a general issue for containers of function objects? -- AlisdairM