Boost logo

Boost :

From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2004-01-02 07:06:51


Hello,

I have written an implementation of the hash table library proposed by
Matthew Austern for standardization (and accepted into the TR). I
believe that it is completely conformant to the proposal.

The behavior of rehash in the case that an exception is thrown by the
hash function is not specified in the proposal. In this
implementation, if an exception is thrown by a hash function during a
rehash operation, the hash table is cleared. This appears to be better
behavior than leaving the container in state where it contains an
arbitrary set of elements.

The implementation of the hash functions for floats and doubles may be
problematic. Specifically, it depends on the reinterpret_cast<unsigned
char *>(&value) representation of equal doubles and floats being
equal. It is not clear that there is an efficient way to implement
these hash functions without making that assumption.

The implementation can be found at:

http://groups.yahoo.com/group/boost/files/

with the name "jtc1-sc22-wg21-2003-n1456.tar.gz".

The proposal is available at:

http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1456.html

with several corrections that were published are available at:

http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1549.pdf

Thorsten Ottosen expressed interest in having such a library for the
purpose of supporting hash tables in his pointer container library. It
may also be useful for the purpose of having a reference implementation
of the proposal until implementations are widely available.

-- 
Jeremy Maitin-Shepard

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