Re: [Boost-users] [multi_index] Problem with find() and Hashed_Index
Hello Martin,
----- Mensaje original -----
De: Martin Higham
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)
-
JOAQUIN LOPEZ MU?Z