|
Boost Users : |
Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-04-06 14:02:08
AMDG
On 04/06/2011 10:46 AM, Peter Dimov wrote:
> Eric Niebler wrote:
>
>> I'm saying that boost::function should actually be defined in
>> boost::function_adl_block and be imported into the boost namespace
>> with a using declaration.
>
> This makes no sense to me. boost::bind is the unconstrained function
> template found by ADL, not boost::function. You ought to be arguing that
> boost::bind should be in an ADL-blocking namespace. Of course this will
> break all code that relies on ADL to omit the boost:: qualification.
>
The problem is that it's much easier to put
a class in an ADL blocking namespace, than to
put a class in al ADL blocking namespace:
namespace bind_adl_block
{
template<class F>
void bind(F f);
}
using bind_adl_block::bind; // bind can still be found by ADL
The only way to do it is with a using
directive:
using namespace bin_adl_block;
but this is fragile for other reasons.
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