Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-07 10:05:45


I have encountered a situation where I have a boost::function:

boost::function<void> onClick;

initialized to a function object with a known type F (which is similar to a
std::vector<boost::function<void> > with a broadcasting operator().)

At some later point I need to ask onClick "do you contain an instance of F?
if yes, please give me a reference to it so I can add another handler."

Ideas?

BTW, the function documentation mentions 'operator bool' which has been
replaced by 'operator safe_bool.' Also, operator! is not necessary.

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk