Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-27 12:50:57


"Nat Goodspeed" <ngoodspeed_at_[hidden]> writes:

> As far as I'm aware, the only documented way to capture an object
> created by boost::bind() is to use boost::function. I understand your
> point about the inefficiency of using boost::function in my
> const_iterator type, but right now I know no better way to express it.

Of course, you could always use your own data member accessor function
object whose type is more reliable. You could even avoid another
indirection by making the member pointer a template parameter,

> Perhaps it would be useful to augment bind.hpp with a companion template
> that could reliably describe the type of the object produced by a
> particular call to boost::bind()?

Not a bad idea. Of course, the Boost typeof library has been accepted
and would do this for you quite nicely given the right registrations
in the bind library, but it's not in the CVS yet :)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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