Boost logo

Boost :

Subject: Re: [boost] [unordered] [MultiIndex] iterator_to
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-10 16:32:16


on Sat Nov 01 2008, Joaquin M Lopez Munoz <joaquin-AT-tid.es> wrote:

> Not that this has to do with the multi-indexing capabilities
> of Boost.MultiIndex, but I think you can still take (a little)
> advantange of the lib by using a multi_index_container<hashed_unique>
> instead of a unordered_map, because the former has an iterator_to()
> member function that allows you to retrieve an iterator from
> a value_type*, so saving you the jump from Key* to an iterator
> via map.find() that your code has at pop().

I am using boostpro-1.34.1-svn for this project. Since it is based on
boost-1.34.1, it doesn't have iterator_to yet :(. I could backport the
multi_index changes, but in reality all I need is a plain unordered_map.
If I could prevail upon Daniel James to add iterator_to to
Boost.Unordered so it will be there in the future, I'd gladly backport
that change into my version

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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