Boost logo

Boost :

Subject: Re: [boost] [Range] begin/end ADL issues in C++0x range-based for
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-12-21 03:11:57


On 12/20/2010 11:06 PM, Michel MORIN wrote:
> Hi Sebastian,
> Thanks for your comment.
>
>> I suggest you rename the feature macro to BOOST_NO_STD_BEGIN_END and put it
>> in the standard library part of the configuration (boost/config/stdlib).
>
> I don't have strong opinion about renaming, but I'd like to hear
> other's opinions.
>
> BTW, I'm beginning to think that using ADL barrier technique to boost::begin/end
> is enough to solve ambiguity call problems.
[...]

Just to be clear, as you seemed to indicate something slightly different
in another post: Do you propose to prevent boost::begin/end from being
picked up by ADL; to prevent boost::fusion::begin/end from being picked
up by ADL; or both...? Do either of these begin/end combinations
actually *need* to be found via ADL (i.e., is that a desirable feature,
regardless of it possibly breaking existing code)? Ranges adapted to
work with Boost.Range (by defining range_begin/range_end) will generally
have to be re-adapted to work with the range-based for loops, so I
wouldn't think relying on boost::begin/end to be found via ADL to be too
useful...

Also, again to be clear: What are the tradeoffs between defining
Boost.Fusion's begin/end in another namespace and bringing them into the
boost::fusion namespace with a using declaration; and defining the data
structures in another namespace and bringing them into the boost::fusion
namespace with a using declaration; or both?

- Jeff


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