Boost logo

Boost :

Subject: Re: [boost] [bind] Placeholders suggestion, std and boost
From: Peter Dimov (lists_at_[hidden])
Date: 2015-05-25 07:12:44


Glen Fernandes wrote:
> I propose creating <boost/bind/bind.hpp>. Including it should result in
> the placeholders being in boost::placeholders namespace. <boost/bind.hpp>
> would now do nothing more than just include <boost/bind/bind.hpp> and
> bring all the placeholders into the global namespace.

That's not a bad plan, but it would've been even better if
boost/bind/bind.hpp didn't already exist. :-)

> #include <boost/bind/bind.hpp>
>
> using boost::placeholders::_1;

I'm having a bit of trouble deciding between the above and

    using namespace boost::placeholders;

The using declarations are closer to the current code and would be a better
bet compatibility-wise, but the using directive seems more correct somehow.


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