On Mar 8, 2004, at 5:05 PM, George Diamantopoulos wrote:
Hi everyone,
I was trying the other day to "save" a boost::lambda::bind I made so I can reuse it a few lines later.
I tried saving to a bind_t which seems to be the return type of bind() but I was getting some compilation errors. If I recall correctly, it wouldn't find bind_t in any of boost:: or boost::lambda::
I've never used boost::lambda, but boost::bind returns an unspecified type.
Anyone knows if/how it's possible?
Yes; I regularly do this. Though the type is unspecified, it is assignable to a boost::function.
Just in case you're don't know what I mean, here's a code snippet:
bind_t myExpression = bind(&Object::method, this); f(myExpression); g(myExpression);
Try something like:
boost::function