http://lists.boost.org/boost-users/2007/01/24529.php
Is this what you want?
On 10/19/07, Chris Weed
Hi, I would like to bind to the boost::get<N> function for use by transform iterator. This is the pseudo code if get worked like a simple function.
std::vector
> v(2); v[0] = tuple (2,2,2.2f); v[1] = tuple (3,3,3.3f); std::accumulate( boost::make_transform_iterator( v.begin(), boost::lambda::bind(&boost::get<1>,_1)), boost::make_transform_iterator( v.end(), boost::lambda::bind(&boost::get<1>,_1)), 0); I find bind is difficult to use for functions that deduce template arguments from function arguments.
I thought if I changed boost::get<1> -> boost::get<1,tuple
That didn't work either. Digging through tuple.hpp makes my head spin. Is there an easy way to do this.
Thanks, Chris _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users