Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-11-29 17:26:08

Peter, I've been expecting for some time that you were going to put the
placeholders in a sub-namespace of boost, if only to avoid the ODR
violations it is currently causing. No?

The fact that I have to write mpl::_1 just to avoid colliding with
<unnamed>::_1 is disconcerting at best. If another library came along
and did what boost/bind/placeholders.hpp does, it would cause a clash.

My suggestion, assuming you care about backwards compatibility, is:


   declares placeholders in namespace boost::bind::placeholders.


   has the current contents of boost/bind.hpp, except that
   placeholders are not declared in the <unnamed>::


   #include <boost/bind/bind.hpp>
   #include <boost/bind/placeholders.hpp>
   namespace { using namespace boost::bind::placeholders; }

Is something wrong with that?

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at