On Tue, Apr 5, 2011 at 9:22 PM, Dave Abrahams <dave@boostpro.com> 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 Boost.Bind
placeholders out of the global namespace would be completely out of the question
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 appropriate
Boost.Lambda placeholders. The issue of Boost.Function dragging Boost.Bind
into name lookup is harder to deal with. Peter's shorthand for explicit qualification
on every use is about best option I think. How does Eric's ADL-blocker namespace
mechanism work?
- Rob.