Boost logo

Boost Users :

Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Eric Niebler (eric_at_[hidden])
Date: 2011-05-25 07:49:46

(fixing attribution...)

On 5/23/2011 11:42 PM, Robert Jones wrote:
> On Thu, Apr 7, 2011 at 3:01 PM, Steven Watanabe wrote:
>> At some point in time, Eric Niebler wrote:
>>> And what is wrong with leaving bind in the boost namespace as I was
>>> suggesting and define boost::function like this:
>>> namespace boost {
>>> namespace function_adl_block {
>>> template<class Sig>
>>> struct function {...};
>>> }
>>> using function_adl_block::function;
>>> }
>>> Now the "boost" namespace is no longer associated with
>>> boost::function,
>>> and boost::bind won't be found by ADL. Unless I'm mistaken, and
>>> a quick
>>> test with comeauonline suggests I'm not. But Steven and Peter are
>>> usually right about this stuff, so I'll patiently wait to be
>>> corrected
>>> and learn. :-)
>> Yes, you're correct about this.
> Ok, this seems to be a resolution to the issue. How about this change,
> and is there
> anyone of greater boosty skills than me who'd do it?

I have nothing against this change (obviously, since I suggested it).
And it probably wouldn't require a great deal of "boosty skill," either.
I say try it and see what breaks. :-)

It's probably a good general policy to move most/all types in Boost into
ADL-blocking namespaces like above, except those for which there is
reason to keep boost as an associated namespace. Of course, that's a big
job and I don't volunteer, but would it pay to have this as a documented
library development guideline?

Eric Niebler
BoostPro Computing

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