Tools.h++ Class Reference

Table Of Contents
float
fill_ratio() const;
Returns the result of calculating size()/capacity().
size_type
size() const;
Returns the number of items currently held in self.
Mutators
void
clear();
A synonym for erase(begin(),end());
size_type
erase(const key_type& key);
Removes all pairs in self for which the first part is EQ to key, and returns the number of
removed elements.
iterator
erase(iterator iter);
Removes the element referenced by iter and returns an iterator referencing the "next"
element. If iter does not reference an item in self, the result is undefined.
iterator
erase(iterator first, iterator bound);
Removes each element in the range which begins with first and is bound by bound.
Returns an iterator referencing bound. If first does not reference an item in self (and if
first and bound are not equal), the effect is undefined.
pair<iterator,bool>
insert(const value_type& val);
Inserts the pair, val, and returns a pair with an iterator referencing the new element and
true.
size_type
insert(iterator ignore, const value_type& val);
Inserts the pair, val, returning 1. Note that the first argument is provided only for
conformance with the ANSI associative container specification, and is ignored by the
method, since hash table look up can be done in constant time.
size_type
insert(const value_type* first, const value_type* bound);
For each element in the range beginning with first and bounded by bound, the element is