Boost logo

Boost :

Subject: Re: [boost] Removing Bind placeholders from the global namespace
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-06-14 16:18:05


Sohail Somani:
> If the boost::placeholders namespace was to exist, I was suggesting that
> boost standardize on the placeholders in that namespace.

OK, but what does this mean in the short term? What shoud we do with the
immediate problem of bind's global placeholders?

> This way, one can add "using namespace boost::placeholders" where there
> is a lot of binding going on and not worry about whether they should be
> using lambda's _1 or bind's _1 or phoenix arg1 or whatever else there is
> now.

This is unlikely. First, Lambda will probably not be converted to use
placeholders other than its own. Second, once you have several competing
libraries, you have to decide on the type of _1 + 1; it can't return both a
Phoenix expression and a Lambda expression unless Phoenix expressions and
Lambda expressions are interchangeable, in which case you basically have one
library.


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