Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-06-30 08:11:58


"Peter Dimov" <pdimov_at_[hidden]> writes:

>>> Anyway, I guess we'll have to migrate to TR1 style placeholders one
>>> day, but this will break existing code.
>>
>> I'm not sure it has to:
>>
>> namespace bind {
>> extern arg<1> _1;
>> }
>
> #1: extern implies .obj. Currently bind doesn't need a build/install phase.
>
>> namespace { // if you like
>> using bind::_1;
>> }
>
> #2: using declarations of this form have a lot of potential. :-)
>
> I had in mind something like
>
> namespace boost
> {
>
> namespace placeholders // also sagt TR1
> {
>
> inline boost::arg<1> _1() { return boost::arg<1>(); }
>
> } // placeholders
>
> } // boost

That works.

> #ifndef BOOST_BIND_NO_GLOBAL_PLACEHOLDERS
>
> using namespace boost::placeholders;
>
> #endif

The above still makes me very nervous, unless (possibly)
BOOST_BIND_NO_GLOBAL_PLACEHOLDERS is the default.

> But not for 1.32, I think. First thing post-branch, maybe. ;-)

Probably.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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