Tools.h++ Class Reference

Table Of Contents
Construct an rw_hashmap<K,V,Hash,EQ> with sz slots, using h as the hash object, and
eq as the equality comparator, containing a copy of each pair referenced by the range
starting with first and bounded by bound. If there are items in the range for which the K
parts of the pairs match EQ, then only the first such item will be inserted into self.
Public Destructor
~rw_hashmap<K,V,Hash,EQ>();
The destructor releases the memory used by the container's implementation.
Public Operators
rw_hashmap<K,V,Hash,EQ>&
operator=(const rw_hashmap<K,V,Hash,EQ>& rhs);
Sets self to have the same capacity, Hash and EQ as rhs, removes all self's current
contents, and replaces them with copies of the elements in rhs.
bool
operator==(const rw_hashmap<K,V,Hash,EQ> & rhs) const;
Returns true if self and rhs have the same number of elements, and for each value_type in
self, there is a value_type in rhs that has a first part for which the EQ object in self returns
true, and a second part for which operator==() returns true. The need to test both parts
means that this operator is slightly slower than the method equal_by_keys() described
below.
V&
operator[](const key_type& key);
Returns a reference to the V part of a pair held in self which has a part EQ to key, either
by finding such a pair, or inserting one (in which case the reference is to an instance of V
created by its default constructor).
Accessors
iterator
begin();
The iterator returned references the first item in self. If self is empty, the iterator is equal
to end(). Note that because items are stored in pseudo-random order, this iterator might
reference any item that has been stored in self.
const_iterator
begin() const;
The iterator returned references the first item in self. If self is empty, the iterator is equal
to end(). Note that because items are stored in pseudo-random order, this iterator might