- iterators store pointers instead of references to the HashTbl.
This lets us use the default bitwise copy/assignment
- add empty constructor for iterators. It returns the equivalent to end().
This lets us do this:
HashTbl<label>::iterator iter;
// some time later
iter = find(Value);
- erase(const HashTbl<AnyType, Key, AnyHash>&) is now more generous.
Only the Key type matters, not the hashing function.
- The capitalization is consistent with most other template classes, but
more importantly frees up xfer() for use as method name without needing
special treatment to avoid ambiguities.
It seems reasonable to have different names for transfer(...) and xfer()
methods, since the transfer is occuring in different directions.
The xfer() method can thus replace the recently introduced zero-parameter
transfer() methods.
Other name candidates (eg, yield, release, etc.) were deemed too abstract.
StaticHashTable:
- erase(iterator&) now actually alters the iterator and iterator++() handles
it properly
- clear() also sets count to zero
- operator=(const StaticHashTable&) doesn't crash after a previous transfer
- operator(), operator==() and operator!=() added
HashTable:
- operator=(const HashTable&) gets tableSize if required, eg, after a
previous transfer)
HashSet / Map
- add xfer<...> constructor for underlying HashTable