|
Boost Users : |
Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-04-06 12:16:23
On Tue, Apr 5, 2011 at 11:46 AM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Robert Jones wrote:
>>
>> > On Tue, Apr 5, 2011 at 2:27 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
>> >
>> > using boost::lambda::bind;
>> >
>> > should be a better choice.
>>
>> Hello Peter
>>
>> Yes, that was my first thought too. But this code still has ambiguity
>> issues.
>
> Yes, you're right, it has. Since boost::function is in namespace boost, the
> compiler still finds boost::bind via argument-dependent lookup. I'm afraid
> that you'll have to qualify the ambiguous bind:
>
> namespace ll = boost::lambda;
> ll::bind( my_sum, ... );
>
I may have forgotten the real truth, but at one point I thought I knew
that the compiler would do ADL on using-declarations, but not on names
brought in via using-directive.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
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