Boost logo

Boost :

Subject: Re: [boost] [tokenmap] updated perfect hash container in sandbox
From: Slawomir Lisznianski (sl_at_[hidden])
Date: 2010-04-21 13:18:44


strasser_at_[hidden] 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.

> btw, a similar technique (but without the iterating and the randomizing
> part) is employed in my implementation of thread_specific_ptr:
> http://www.boostpro.com/vault/index.php?action=downloadfile&filename=tss.hpp&directory=&

Interesting... thanks for the hint.

> that would be another use case of your container if it is configurable
> enough in the final version.

It shall be. Also, thanks for bullet-point examples of analogous
operations. It summarized it all well.

-sl


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk