|
Boost : |
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-12-13 18:28:05
On 13/12/2019 17:58, Peter Dimov via Boost wrote:
> Niall Douglas wrote:
>> > Breaking code without any warning is not a good practice, but I'll
>> mark > <boost/bind.hpp> as deprecated to allow people time to migrate.
>>
>> Personally speaking, I think the macro `BOOST_BIND_NO_PLACEHOLDERS`
>> needs to become `BOOST_BIND_ENABLE_GLOBAL_PLACEHOLDERS`. People can
>> still use <boost/bind.hpp>, but they'll need to explicitly opt into
>> the old behaviour.
>
> That's true in principle, and will be my next step, at some point.
>
> But what's also true is that people don't appreciate their code - that
> has worked for decades - to be broken. Just grep for <boost/bind.hpp>
> within Boost, and extrapolate.
Ok, how about this:
1. Both `BOOST_BIND_NO_PLACEHOLDERS` and
`BOOST_BIND_ENABLE_GLOBAL_PLACEHOLDERS` have the effect on placeholders
injection.
2. The deprecation message says something like "In Boost v1.XX, the
macro BOOST_BIND_NO_PLACEHOLDERS shall cease to have effect, and the
macro BOOST_BIND_ENABLE_GLOBAL_PLACEHOLDERS will default to undefined.
This will cause ::placeholders to no longer be injected into the global
namespace by default. Please stop using <boost/bind.hpp>, or define
BOOST_BIND_ENABLE_GLOBAL_PLACEHOLDERS to suppress this message.".
How about Boost v1.76 as the switch over point? That's a year's notice.
Niall
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk