Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2005-10-31 16:57:22


----- Mensaje original -----
De: Andreas Volz <lists_at_[hidden]>
Fecha: Lunes, Octubre 31, 2005 7:27 pm
Asunto: Re: [Boost-users] [Multi-Index] composite_key problems

> The questions seems to by stupic, but how
> could I
> access the data looked up by B alone? What should I assign to the
> left?
> > ??? = es.get<1>().find(b);
>
> An iterator or what else?

This returns an iterator, yep. Please notice that

  es.get<1>()

returns a reference to an index, which is, in many
respects, entirely similar to a regular std::set.
So you have find(), equal_range() etc. just like
in the STL case, with equivalent syntax and semantics.
You might want to give the Boost.MultiIndex tutorial
a further read --anyway, don't hesitate to come back
here if things aren't still clearer.

Joaquin M Lopez Muñoz
Telefonica, Investigacion 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