Re: [Boost-users] [multi_index] Problem with find() and Hashed_Index
Thats just what I needed to know. It's all working fine now. Thanks Martin
From: JOAQUIN LOPEZ MU?Z
To: boost-users@lists.boost.org Date: Sun, 04 Dec 2005 00:31:08 +0100 Subject: Re: [Boost-users] [multi_index] Problem with find() and Hashed_Index Hello Martin, ----- Mensaje original ----- De: Martin Higham
Fecha: Sábado, Diciembre 3, 2005 11:42 am Asunto: [Boost-users] [multi_index] Problem with find() and Hashed_Index I have created a multi_index_container inline with one ordered_unique index and one hashed_unique index as demonstrated in the documentation
(http://www.boost.org/libs/multi_index/doc/advanced_topics.html#hash_lo okup).I can happily add and retrieve items using find() as indicated.
However, if I use the =* operator as indicated and there is no matching record a memory error occurs.
Therefore I need to assign the find result to an iterator and check for end(). Can anyone tell me what type this iterator should be? I've tried many combinations non of which compile.
There are several syntaxes to get to the type of the iterator:
your_container_type::nth_index<N>::type::iterator your_container_type::index<Tag>::type::iterator your_container_type::nth_index_iterator<N>::type your_container_type::index_iterator<Tag>::type
Where N is the 0-based ordinal of the index you're interested in. If the index is tagged, you can also use the <Tag> variations. Does this help? Thanks for using Boost.MultiIndex!
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (1)
-
Martin Higham