Boost logo

Boost Users :

From: Martin Higham (martinh_at_[hidden])
Date: 2005-12-06 04:46:46


Thats just what I needed to know. It's all working fine now.

Thanks

Martin

> From: JOAQUIN LOPEZ MU?Z <joaquin_at_[hidden]>
> To: boost-users_at_[hidden]
> 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 <martinh_at_[hidden]>
> 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
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net