#include "exceptions.hpp"\r
#include "safe_iterator.hpp"\r
#include <map>\r
+#include <iostream>\r
\r
namespace stlplus\r
{\r
iterator insert(const K& key);\r
\r
// remove a key/data pair from the hash table\r
- bool erase(const K& key);\r
+ // as in map, this returns the number of elements erased\r
+ size_type erase(const K& key);\r
+ // remove an element from the hash table using an iterator\r
+ // as in map, returns an iterator to the next element\r
+ iterator erase(iterator it);\r
// remove all elements from the hash table\r
void erase(void);\r
- // provide the std::map equivalent clear function\r
+ // map equivalent of above\r
void clear(void);\r
\r
// find a key and return an iterator to it\r
const_iterator end(void) const;\r
iterator end(void);\r
\r
+ // diagnostic report shows the number of items in each bin so can be used\r
+ // to diagnose effectiveness of hash functions\r
+ void debug_report(std::ostream&) const;\r
+\r
// internals\r
private:\r
friend class hash_element<K,T,H,E>;\r