Boost logo

Boost :

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


>>> similar to iterator_facade, which when provided with a member function
>>> It::partition_point( It it, Pred pred ), implements the others as free functions. Is
>>> there any interest, and possibly willingness to include it into Boost.Iterator?
>>>
>>
>> Although I've commented on this a few days ago, let me restate that
>> I am very interested in having something like this in Boost. IMHO
>> the partition approach is a nice addition to the iterator framework,
>> and fills in the gap by which associative containers have to provide
>> lookup member functions instead of relying on <algorithm>, an
>> ugly breach of genericity.
>
>a. that all sounds very interesting
>b. I'd like to see more detail
>c. I probably can't absorb it now, though; I'm buried under a deadline
   at the moment.

So here is the implementation, as it is running in our production code. As far as I can see, there is no boost::partition_point, so I rolled my own. The code is only half-boostified. Ignore the make_XXX_range functions. BOOST_CUSTOM_PARTITION is currently a macro, because IMO that is the only way to be able to add it to existing iterators. If Boost.Iterator and Boost.MultiIndex are both willing to include it into their iterators, I am happy to make it a base class a la iterator_facade and integrate it into the existing code base.

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