
On 21.02.2010 23:59, Slawomir Lisznianski wrote:
http://svn.boost.org/svn/boost/sandbox/tokenmap/libs/tokenmap/doc/html/index...
A tokenmap is a data structure that uniquely maps pseudo-random generated keys with elements of the collection.
Boost.Tokenmap is a (perfect) hash container library for C++. An important distinction between tokenmap and other dictionary-like containers, such as std::map or Boost.Unordered, is that tokenmap generates keys internally (referred to as "tokens") rather than relying on user to provide them. Specifically, when a new element is inserted into the tokenmap, an apparently random key is returned back to the caller which uniquely maps to the stored element. The returned key can later be used in a very efficient lookup.
Although the code and documentation are far from complete, the implementation in the repo is functional and hopefully serves as a basis for further work.
How is it different from having an iterator or a pointer to the inserted element?