Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2003-09-03 07:54:17


Hurd, Matthew wrote:

> Lambda's v cool but it tends not to play fair when promoted to global
> scope

promoting to global scope is not a good idea anyway.

> and lambda::_1 just doesn't look right ;-)

{
  namespace l = boost::lambda;

  [...] l::_1 [...]
}

and lookup rules never bite

> Would be nice to solve the conflicts with boost::bind and lambda::bind.

The conflict is due to the existence of ::_1 in the boost library
(placeholders.hpp)

I requested ::_1 to be moved to namespace boost::bind or
boost::anything_else some months ago.
Peter Dimov rejected this, David Abrahamas rejected the rejection,
http://groups.yahoo.com/group/Boost-Users/message/2880
but then nothing happened. I consider the _1 living in global namespace
as a really severe, annoying bug (OK, admittedly I consider most code
not living in its own namespace at least as suboptimal)

> Also there is, at least, a conflict with _1 between spirit and lambda that
> has bitten me, perhaps others...

As long as all those live in their own namespace
a simple "using that::_1;" saves you from all pain.
For me the namespace alias trick is the one to get around
any failure, even with broken libraries at hand.

Markus

-- 
Build your own Expression Template Library with Daixtrose!
Visit http://daixtrose.sourceforge.net/ 

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