Boost logo

Boost Users :

From: Sebastian Weber (sebastian.weber_at_[hidden])
Date: 2006-10-24 03:16:54


Hello!

> Boos.Bind will only do the binding bit - what you're wanting to do
> (apply an expression to the parameter at call-time) can be
> accomplished with Boost.Lambda - which has its own bind facility (with
> pretty much exactly the same syntax as Boost.Bind) that you'll need to
> use instead of Boost.Bind.

Thanks for the hint, you are absolutely right. Nevertheless, it is a
mess to use the lambda library with overloaded functions, as the correct
call (which took me now about an hour to find out seems to be):

boost::lambda::bind(static_cast<data_t::reference
(data_t::*)(std::size_t)>(&data_t::at), &dataVec, boost::lambda::_1 -
shiftedIndex)

This really messy, I think.

Greetings,

Sebastian Weber

>
> HTH
> Stuart Dootson
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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