Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2006-08-09 13:29:53


----- Mensaje original -----
De: Matias Capeletto <matias.capeletto_at_[hidden]>
Fecha: Miércoles, Agosto 9, 2006 6:40 pm
Asunto: Re: [boost] Boost.Bimap - Informal Review Request

> On 8/9/06, JOAQUIN LOPEZ MU?Z <joaquin_at_[hidden]> wrote:

> > I've got a feature request about list_of and vector_of. When
> > writing for instance:
> >
> > bimap<set_of<X>,list_of<Y> >
> >
> > we know (unlike in Boost.MultiIndex) that the Y part does not
> > belong to any index key and thus can be freely mutated. Could it
> > be possible that, in those cases, the associated relation
> > class held a mutable Y allowing for direct manipulation of
> > that member?
>
> Nice! That will be very useful. A map where you can iterate over
> the data types?
[...]

Not sure if I've explaiend myself clearly. What I mean is,
suppose I've got

  typedef bimap<set_of<int>,list_of<std::string> > bm_type;

then it'd be good to be able to write:

  bm_type bm;
  ...
  bm.left.begin()->second="hola";

which is currently not possible since bm_type::value_type::left
is const. But in this particular case there's no danger
in making bm_type::value_type::left a mutable member (thus
allowing for the above) since list_of<> is not key-based.

Sorry if my proposal was already clear and this re-explanation
is superfluous, but I'm not getting yout "you can iterate over
the data types" part.

Best,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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