click
click copied to clipboard
non-const `HashTable::operator[]` dies on failure to allocate
If key is not in the table and allocation fails in find_insert, we return *NULL and the caller is likely to explode. Should this method return default_value() instead, like HashTable::operator[] const does? Since these templates do not use exceptions, it might actually be better to remove operator[] altogether and force folks to rely on ::find and ::find_insert.