$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-04-05 09:27:32
Robert Jones wrote:
...
> int main( )
> {
> boost::lambda::placeholder1_type x;
> boost::lambda::placeholder2_type y;
>
> std::vector<X> v;
>
> std::accumulate( boost::begin( v ), boost::end( v ), 0, bind( sum, x,
> bind( &X::f, y ) ) );
> }
You're relying on argument-dependent lookup here and it works only because x
and y happen to be in namespace boost::lambda. A using declaration for
boost::lambda::bind:
using boost::lambda::bind;
should be a better choice.