Boost logo

Boost :

Subject: Re: [boost] [Iterator][MultiIndex]iterator-specificpartition_point-related functions
From: Arno Schödl (aschoedl_at_[hidden])
Date: 2008-11-28 03:30:31


> Your BOOST_CUSTOM_PARTITION macro overloads lower_bound, etc
> for the iterator type of interest: as far as I can see, this is not
> necessary
> since boost::lower_bound could use partition_point through ADL, which is
> the only customization point we need. To put it more succintly,
> why can't you just have

This would require the user to specify "using boost::lower_bound" if he wants to implement a custom_partition for one of his own iterators outside namespace boost, right? This may lead to ambiguities between std::lower_bound and boost::lower_bound if other non-boost libraries do

using std::lower_bound;
lowerbound( ... ) // unqualified, the well-intentioned implementor wants to allow ADL

The Visual Studio 2008 std library makes such unqualified calls, so it suffers from this ambiguity. I think this is a defect, all calls are supposed to be prefixed. But there may be other 3rd party libraries that contain "using std::lower_bound".

Arno

--
Dr. Arno Schoedl · aschoedl_at_[hidden] 
Technical Director 
 
think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany 
http://www.think-cell.com · phone +49-30-666473-10 · toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Charlottenburg, HRB 85229

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