
On 23 February 2010 09:02, Andrey Semashev <andrey.semashev@gmail.com> wrote:
In that case I would prefer the token generation mechanism to be separated from the container structure. This would enable users to use tokens in different containers, from STL to Boost.MultiIndex and Boost.Intrusive. The proposed tokenmap would be equivalent to the standard unordered containers with the tokened values then.
I don't think you could do that without special support from the container. For MultiIndex you could implement a new index type. It could possibly reuse this implementation if it had some sort of ownership policy but MultiIndex normally implements that kind of thing itself. I can't see any benefit from Intrusive in this case. There are no collisions so there's no need to do anything like chaining the elements. Daniel.