|
Boost : |
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2019-12-13 17:41:28
>> In boost/bind.hpp there is injection of a boost namespace contents
>> into the global namespace:
>
> Including <boost/bind/bind.hpp> doesn't bring the placeholders into the
> global namespace; if you don't want them there, just include
> <boost/bind/bind.hpp>. <boost/bind.hpp> does for backward compatibility.
Unfortunately, some of the Boost libraries include <boost/bind.hpp>, and
thus pollute the global namespace.
>> Please fix this in the next release of Boost.
>
> 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.
(This will also encourage the maintainers of those libraries depending
on global placeholders to fix their libraries)
Niall
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk