Boost logo

Boost Users :

Subject: Re: [Boost-users] [phoenix] another problem with member_variable bind
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-11-07 16:19:17


AMDG

Christian Henning wrote:
> vector< point > points;
>
> // doesn't work
> std::transform( points.begin()
> , points.end()
> , points.begin()
> , bind( &point::_prob, arg1 ) * val( 2.0 )
> );
>

Certainly, it won't work. You're code does the equivalent of:

points[i] = points[i]._prob * 2.0

In Christ,
Steven Watanabe


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