
24 Oct
2006
24 Oct
'06
9:39 p.m.
Matt Davies wrote:
<snip>
I am not sure if I can store a functor with parameter values in a generic container only to invoke it at a later time.
Any ideas would be very welcome.
You can use boost::bind to bind all the arguments and get a nullary functor
back, which you can store in a container as a boost::function. Something
like this (not tested):
void foo(int i, string s) { ... }
typedef boost::function