Boost logo

Boost Users :

Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Eric Niebler (eric_at_[hidden])
Date: 2011-04-05 15:41:45

On 4/5/2011 10:46 PM, Peter Dimov 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.

Yuk. Is it ever desirable for an argument of type boost::function to
cause lookup in namespace boost? Probably not, right? That would argue
for moving boost::function into an ADL-blocker namespace.

And perhaps boost::bind and its placeholders should also be in an
ADL-blocker namespace, but I seem to recall that the placeholders are
not in any namespace for legacy reasons, is that right?

Eric Niebler
BoostPro Computing

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at