<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Wording for GB 58</title>

	<style>
	p {text-align:justify}
	li {text-align:justify}
	blockquote.note
	{
		background-color:#E0E0E0;
		padding-left: 15px;
		padding-right: 15px;
		padding-top: 1px;
		padding-bottom: 1px;
	}
	ins {color:#00A000}
	del {color:#A00000}
	code {white-space:pre;}
	</style>
</head>
<body>

<address align=right>
Document number: P0508R0<br>
<br/>
<br/>
<a href="mailto:howard.hinnant@gmail.com">Howard E. Hinnant</a><br/>
2016-11-10<br/>
</address>
<hr/>
<h1 align=center>Wording for GB 58</h1>

<p>
Note that the wording below goes slightly beyond the scope of GB 58 by removing
<code>insert_return_type</code> from <code>multimap</code>, <code>multiset</code>,
<code>unordered_multimap</code>, and <code>unordered_multiset</code>.  It was
a mistake to put <code>insert_return_type</code> into these containers, and it
is unused in these containers.
</p>

<a name="Wording"></a><h2>Proposed Wording</h2>

<ol>
<li>
<p>
Add a new section after 23.1.1 Node handles [container.node]:
</p>
<blockquote>
<p>
<b>23.1.2 Insert return type [container.insert_return_type]</b>
</p>
<p>
The associative containers with unique keys, and the  unordered containers with
unique keys have a member function <code>insert</code> that returns a nested
type <code>insert_return_type</code>. That return type is a specialization of
the type specified in this section.
</p>
<blockquote><pre>
template &lt;class Iterator, class NodeType&gt;
struct <i>INSERT_RETURN_TYPE</i>
{
    Iterator position;
    bool     inserted;
    NodeType node;
};
</pre></blockquote>
<p>
The name <code><i>INSERT_RETURN_TYPE</i></code> is exposition only.
<code><i>INSERT_RETURN_TYPE</i></code> has the template parameters, data
members, and special members specified above. It has no base classes or
members other than those specified.
</p>
</blockquote>
</li>

<li>
<p>
Remove the row from Table 86 &mdash; Associative container requirements [associative.reqmts]
that describes <code>X::insert_return_type</code>.
</p>
</li>

<li>
<p>
Remove the row from Table 87 &mdash; Unordered associative container requirements [unord.req]
that describes <code>X::insert_return_type</code>.
</p>
</li>

<li>
<p>
Modify the synopsis of <code>map</code> in [map.overview]:
</p>
<blockquote><pre>
using node_type              = <i>unspecified</i>;
using insert_return_type     = <del><i>unspecified</i>;</del> <ins><i>INSERT_RETURN_TYPE</i>&lt;iterator, node_type&gt;;</ins>
</pre></blockquote>
</li>

<li>
<p>
Modify the synopsis of <code>set</code> in [set.overview]:
</p>
<blockquote><pre>
using node_type              = <i>unspecified</i>;
using insert_return_type     = <del><i>unspecified</i>;</del> <ins><i>INSERT_RETURN_TYPE</i>&lt;iterator, node_type&gt;;</ins>
</pre></blockquote>
</li>

<li>
<p>
Modify the synopsis of <code>unordered_map</code> in [unord.map.overview]:
</p>
<blockquote><pre>
using node_type              = <i>unspecified</i>;
using insert_return_type     = <del><i>unspecified</i>;</del> <ins><i>INSERT_RETURN_TYPE</i>&lt;iterator, node_type&gt;;</ins>
</pre></blockquote>
</li>

<li>
<p>
Modify the synopsis of <code>unordered_set</code> in [unord.set.overview]:
</p>
<blockquote><pre>
using node_type              = <i>unspecified</i>;
using insert_return_type     = <del><i>unspecified</i>;</del> <ins><i>INSERT_RETURN_TYPE</i>&lt;iterator, node_type&gt;;</ins>
</pre></blockquote>
</li>

</ol>

</body>
</html>
