From: David B. Held (dheld_at_[hidden])
Date: 2002-09-17 02:05:24
"Shane Beasley" <sbeasley_at_[hidden]> wrote in message
> (b) Use boost::lambda to do something similar to the above. Unfortunately,
> I cannot see any way for boost::lambda to emulate the functionality of
> compose_f_gx; bind(f, g, x) is f(g, x), which isn't very useful here.
I would recommend boost::bind(). All compose_f_gx() does is chain
two bind calls together (effectively). You can call nested bind()s, of
You want something like:
boost::bind(select2nd(), boost::bind(func, _1))
As you can imagine, select2nd just helps you get at the second member
of a pair. A lot of people write this themselves, but there may be
useful in boost::tuples.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk