Re: [Boost-users] [Multi-Index] Categorised Container

Hi Marsh, multi_index_container < T hashed_non_unique<...>, ordered_non_unique<...>
my_container;
So are you expecting hash collisions and doing something useful with them? This is interesting, can you explain more about the problem and why this is useful?
Sure. Take T = pair
I think you're on the right track by calling them 'categories' and suggest you not try to overload it with the hash value used to index the collection (even if they happen to be the same).
Sorry but I'm not sure I can follow your English here. Would you mind paraphrasing it if the issue is still important?
If you didn't want to store redundant data in T, you could define a key extractor which runs your preferred hash function to calculate the category on the fly.
This much redundancy is not a matter for me. But, I'd rather not calculate the category on-the-fly for this container is going to be heavily accessed (and also populated/garbage-collected) for every D which derives from B. Does that make it easier to answer my questions? TIA, --Hossein
participants (1)
-
Hossein Haeri