Subject: Re: [boost] [bind] placeholders in namespace ::
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2011-10-25 09:49:33
Robert Jones-2 wrote:
> On Mon, Oct 24, 2011 at 11:36 PM, lcaminiti <lorcaminiti@> wrote:
>> >From the example above, the docs, and the source code, I am pretty sure
>> Boost.Bind placeholders are defined in the unnamed namespace :: ... why?
>> Isn't it a bad practice for a library to pollute the unnamed namespace?
> Yes, you are correct, they are, and yes you are correct it's almost
> certainly a mistake.
> This comes up time and time again, and I think it's fair to say it's about
> the most
> recognized misjudgement in Boost, but it's also water under the bridge
> would be massively disruptive to change it. I guess at the time _1 seemed
> pretty innocent token token to put in the global namespace, and of course
> it does allow you to use placeholders unqualified.
> When Boost.Bind was more or less adopted as std.bind, this was changed.
OK, it makes sense. (Maybe these historic reasons could be added to the docs
to avoid further questioning...)
Thanks a lot.
-- View this message in context: http://boost.2283326.n4.nabble.com/boost-bind-placeholders-in-namespace-tp3934814p3936788.html Sent from the Boost - Dev mailing list archive at Nabble.com.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk