Boost logo

Boost :

Subject: Re: [boost] Removing Bind placeholders from the global namespace
From: Sohail Somani (sohail_at_[hidden])
Date: 2009-06-13 17:50:38


Andrey Semashev wrote:
> On Saturday 13 June 2009 22:02:27 Peter Dimov wrote:
>> This topic has again come up recently in boost-users. I have already
>> assigned myself a ticket,
>>
>> https://svn.boost.org/trac/boost/ticket/2240
>>
>> but have done nothing so far, in part because it would break other Boost
>> libraries. (Patching placeholders.hpp is trivial in itself.)
>>
>> This is one case in which the trunk/release procedures don't work well
>> as-is unless someone volunteers to produce a patch against all of Boost
>> that at once moves the placeholders into namespace boost::placeholders
>> _and_ fixes all errors that this would cause.
>>
>> It'd be easier to split the work: I put the breaking change in and then the
>> libraries are fixed one by one. :-)
>>
>> Comments?
>
> Will it break users' code that don't import boost::bind into the global
> namespace but use placeholders without qualification? If yes then, please,
> leave placeholders available as they are now. I have a plenty of code that
> follows this practice and it won't be easy to update.

>From a user's point of view, I'd say having the user define a
BOOST_BIND_USE_DEPRECATED_PLACEHOLDERS macro or something should be ok
until the user manages to update their code. I also have code that would
break with this change so this would be helpful.

Anyway, isn't boost::placeholders too presumptuous? It's not like any of
the other libraries that use placeholders will be using these
placholders. Unless they are! That would be sweet.

-- 
Sohail Somani
http://uint32t.blogspot.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk