
Zitat von Slawomir Lisznianski <sl@paramay.com>:
strasser@uni-bremen.de wrote:
why is the mapped_type stored by pointer to allocated object instead of by value?
next release (in the works) renames tokenmap to ptr_tokenmap, and a new tokenmap comes in its place with by-value semantics.
I think the "randomized part" could be provided by the user, if the key is a std::pair<index_part, user_part>.
Correct. Next release delegate to an external randomizer. Presumably users will plug Boost Random Number.
I think the this could be a container adapter instead of part of the container, just like std::priority_queue is to std::vector. adapter::key_type would be std::pair<container::key_type,randomized_part> you could use the adapter for any container, and easily use tokenmap without the randomized key part, without using something like boost::empty as the randomized part (e.g. for thread_specific_ptr).