Boost logo

Boost Users :

From: Alisdair Meredith (yg-boost-users_at_[hidden])
Date: 2003-03-28 14:41:17


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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net