Boost logo

Boost Users :

Subject: Re: [Boost-users] [Lambda] Handling Bind/Lambda name clashes.
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2011-04-05 16:54:56

On Tue, Apr 5, 2011 at 9:22 PM, Dave Abrahams <dave_at_[hidden]> wrote:

> At Wed, 06 Apr 2011 02:41:45 +0700,
> Eric Niebler wrote:
> >
> > And perhaps boost::bind and its placeholders should also be in an
> > ADL-blocker namespace, but I seem to recall that the placeholders are
> > not in any namespace for legacy reasons, is that right?
> At this point, if such legacy compilers need to be supported, perhaps
> it makes sense to put the placeholders in a namespace conditionally,
> for all the other compilers?
> I wonder if it would be a good idea to have a Boost-wide policy that
> says something like,
> Librarry interfaces should not be compromised in any way for
> compilers shipped more than 10 years ago/not supported by their
> manufacturer/<appropriate other criterion here>
Whatever policy might apply henceforth I'd imagine that moving the
placeholders out of the global namespace would be completely out of the
at this point.

>From my point of view the problem of the _1, _2, _3, etc placeholders in the
presence of #include <boost/bind.hpp> is manageable by simply avoiding using
them, and simply using arg1, arg2, arg3 or x, y, z and defining them as
Boost.Lambda placeholders. The issue of Boost.Function dragging Boost.Bind
into name lookup is harder to deal with. Peter's shorthand for explicit
on every use is about best option I think. How does Eric's ADL-blocker
mechanism work?

- Rob.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at