
2 Oct
2006
2 Oct
'06
11:55 a.m.
Johan Torp wrote:
I often tend to have interfaces which take a boost::function
that is to be called when an event occurs. Quite often I need make two separate function calls as response to one event. In these cases I usually solve the problem using the following technique: void foo(); void bar();
void call_two(const boost::function
& one, const boost::function & two) { one(); two(); } boost::function
on_event = boost::bind(&call_two, boost::bind(&foo), boost::bind(&bar));
#include