Boost logo

Boost Users :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-05-13 06:43:25


Steven Watanabe <watanabesj <at> gmail.com> writes:

> Boost.Bind declares the placeholders _1, _2, etc at global scope.

We discussed this years ago.
AFAICR Dave Abrahams terminated the discussion with a statement
that clearly considered _1 in global namespace as a
design error. At least this is how I understood his statemment.

So here again someone falls over this.
Years go by and nasty little oddities remain unfixed and - worse -
undocumented (similar to multi_array not modeling Assignable
like any good C++ container in this world).

I would like to revoke this discussion in order to get
this fixed once for all times:

How and when can we get rid of _1 and bretheren in global namespace?

Having bll be a second class citizen has driven me crazy more
than once, letting me put explicit namespace prefixes everywhere,
no longer using Koenig lookup anywhere.
Of course the vicinity of fusion/phoenix/xpressive/proto
complicates the situation, but we can fix this.
std::tr1::placeholders::_1 points into the right direction.
I am thinking of something like boost::placeholders::_, ...::_1, etc.

So maybe the answer to all this is
<http://www.boost.org/doc/libs/1_35_0/doc/html/boost_tr1/
subject_list.html#boost_tr1.subject_list.bind>, but
please, please remove *anything* from global namespace for
boost-1.36 and tag boost::has_evolved_to_tr1* libs as deprecated
in favor to the standardized version.

Markus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net