Re: [boost] Boost.Bimap - Informal Review Request

----- Mensaje original ----- De: JOAQUIN LOPEZ MU?Z <joaquin@tid.es> Fecha: Miércoles, Agosto 9, 2006 7:29 pm Asunto: Re: [boost] Boost.Bimap - Informal Review Request
----- Mensaje original ----- De: Matias Capeletto <matias.capeletto@gmail.com> 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@tid.es> 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...
I meant "right", sorry :) Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

On 8/9/06, JOAQUIN LOPEZ MU?Z <joaquin@tid.es> wrote:
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::right 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.
Yes, you explained yourself very clear the first time. I was toying about how useful is a bimap< X, list_of<Y> > and only add noise, sorry Joaquin. Anyway, your proposal is perhaps more clear now for someone that has not been dreaming about bimaps for the last two months :) Regards Matias
participants (2)
-
JOAQUIN LOPEZ MU?Z
-
Matias Capeletto