Attn: Maintainer of boost/bind.hpp
In boost/bind.hpp there is injection of a boost namespace contents into
the global namespace:
```c++
#include
Niall Douglas wrote:
In boost/bind.hpp there is injection of a boost namespace contents into the global namespace:
Including
Please fix this in the next release of Boost.
Breaking code without any warning is not a good practice, but I'll mark
In boost/bind.hpp there is injection of a boost namespace contents into the global namespace:
Including
doesn't bring the placeholders into the global namespace; if you don't want them there, just include . does for backward compatibility.
Unfortunately, some of the Boost libraries include
Please fix this in the next release of Boost.
Breaking code without any warning is not a good practice, but I'll mark
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
Niall Douglas wrote:
Breaking code without any warning is not a good practice, but I'll mark
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
, 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
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 >
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
, 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
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
participants (2)
-
Niall Douglas
-
Peter Dimov