Topic: [Defect Report] equal_range on unordered containers should return a pair of local_iterators.


Author: David Abrahams <dave@boost-consulting.com>
Date: Mon, 3 Dec 2007 11:39:51 CST
Raw View
on Thu Nov 29 2007, jgottman-AT-carolina.rr.com (Joe Gottman) wrote:

> If instead of returning pair<iterator, iterator>, equal_range were to
> return pair<local_iterator, local_iterator>, then ub (which, like lb,
> would now be a local_iterator) could be guaranteed to always be in the
> same bucket as lb. In the cases where currently ub is equal to b.end()
> or is in a different bucket, ub would be equal to
> b.end(b.bucket(key)). This would make iterating between lb and ub much
> faster, as every iteration would be constant time.

Have you read http://lafstern.org/matt/segmented.pdf ?

--
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]