Boost logo

Boost Users :

From: Adi Shavit (adish_at_[hidden])
Date: 2005-10-28 09:11:39


Hi,

   In my application I used a multi_map of multi_maps as a data
structure to provide indexing with 2 keys, say long strings. Access is
logarithmic on both keys and the keys are not part of the stored object,
thus are potentially only stored once.

I'd like to use multi_index as a more elegant replacement.
However, I'm not clear about where the keys are stored.

In my app, the keys are stored separately from the data, as the keys to
maps, as part of the map data structure.
It seems that in multi_index the keys have to be inside the stored data.
In this case, 10 objects with the same key(s) will all have to hold
copies of the keys (as members).

Is there a way to avoid this?

I hope I'm clear,
Thanks,
Adi


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