<html>
<head>
<title>Resolutions to unordered associative container issues</title>
<body>
<pre>
                                                              N1622=04-0062
                                                              Matt Austern
                                                              24 Mar 2004
</pre>

<h1>Resolutions to unordered associative container issues</h1>

<h2><a name="6_5_Hashing_strings"> 6.5 Hashing strings </a></h2>
<blockquote>
In 6.3.3, change "for any valid set of charT, traits, and Alloc" to
"for any valid set of charT, traits, and Alloc such that charT is
an integer type."
</blockquote>
<p />


<h2><a name="6_7_Exception_safety_of_unordere"> 6.7 Exception safety of unordered associative container operations </a></h2>
<p>Add the following exception guarantee:</p>
<blockquote>
"For unordered associative containers, if an exception is thrown from
within a rehash() function other than by the container's hash function
or comparison function, the rehash() function has no effect."
</blockquote>

<p />
<h2><a name="6_8_Equality_comparability_of_un"> 6.8 Equality-comparability of unordered associative containers </a></h2>
<blockquote>
<p>To section 6.2.1, Unordered associative container requirements, add:</p>
<dd>
  Unordered associative containers conform to the requirements for
  Containers (C++ Standard, 23.1, Container requirements), except that the following expressions are not required to be valid, where a and b denote values of a type X, and X is an unordered associative container class:<br><br>
<p />
<table border=1>
<tr>
<td>
<b>unsupported expressions</b>
</td>
</tr>
<tr>
<td>
a == b
</td>
</tr>
<tr>
<td>
a != b
</td>
</tr>
<tr>
<td>
a &lt; b
</td>
</tr>
<tr>
<td>
a &gt; b
</td>
</tr>
<tr>
<td>
a &lt;= b
</td>
</tr>
<tr>
<td>
a &gt;= b
</td>
</tr>
</table>
</dd>
</blockquote>
<p />

<p />
<h2><a name="6_11_Rationale_for_rehash_precon"> 6.11 Rationale for rehash precondition </a></h2>
<pre>
Page 117 in requirements table  for a.rehash(n)
===============================================

change
    Pre: n > a.size() /
    a.max_load_factor().
    Changes the number of buckets
    so that it is at least n.

to
    a.bucket_count() > a.size() / a.max_load_factor().
    a.bucket_count() >= n. 
</pre>

<p />
<h2><a name="6_13_When_may_an_implementation_"> 6.13 When may an implementation change the bucket count? </a></h2>

<blockquote>
In clause 6.3.1, after the first sentence of the last paragraph, add:
"The insert members shall not affect the validity of iterators if 
(N+n) &lt; z * B, where N' is the container's size, n is the number of
elements inserted, B is the container's bucket count, and z is the
container's maximum load factor."
</blockquote>

<p />
</body>
</html>


</body>
</html>
