On Tue, Dec 8, 2009 at 9:01 PM, Joaquin M Lopez Munoz
Ok, now I got it. The short ansewer is that Boost.MultiIndex does not provide any off-the-shelf way to do what you want, basically because each element (each vector in your case) appears exactly once in any given index.
Long answer: you can approach your scenario by storing "container positions" rather than containers and manually inserting for each new conainer as many different positions as elements has the container. Kind of as sketched in the following program:
<code snippet>
Is this what you're after?
Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
Yes that's it. I tried something similar, using boost::flyweight (hence my question about scoped flyweights). I tried to write another kind of index for BMI some time ago, and if I remember correctly, there is no way to map an element to multiple values of an index. Do you think of anything to point into the code of BMI to try doing it ? Do you have any kind of documentation about writing an index for BMI (to be sure what I'm writing is safe) ? Thanks for this library ! Samuel