Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51081 - sandbox/committee/rvalue_ref
From: dgregor_at_[hidden]
Date: 2009-02-08 00:45:36


Author: dgregor
Date: 2009-02-08 00:45:34 EST (Sun, 08 Feb 2009)
New Revision: 51081
URL: http://svn.boost.org/trac/boost/changeset/51081

Log:
Finish most of the proposed wording for fixing rvalue references
Text files modified:
   sandbox/committee/rvalue_ref/soundness.html | 777 +++++++++++++++++++++++++++++++++++++++
   1 files changed, 775 insertions(+), 2 deletions(-)

Modified: sandbox/committee/rvalue_ref/soundness.html
==============================================================================
--- sandbox/committee/rvalue_ref/soundness.html (original)
+++ sandbox/committee/rvalue_ref/soundness.html 2009-02-08 00:45:34 EST (Sun, 08 Feb 2009)
@@ -1,6 +1,12 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html> <head>
 <title>Fixing a Safety Problem with Rvalue References: Proposed Wording</title>
+<style type="text/css">
+p {text-align:justify}
+li {text-align:justify}
+ins {background-color:#A0FFA0}
+del {background-color:#FFA0A0}
+</style>
 </head>
 
 <body>
@@ -9,10 +15,27 @@
 <p>Authors: Douglas Gregor, David Abrahams<br>
 Contact: doug.gregor_at_[hidden], dave_at_[hidden]<br>
 Organization: Apple, BoostPro Computing<br>
-Date: 2009-02-06<br>
+Date: 2009-02-07<br>
 Number: D2831=09-0021<br>
 Revises: N2812=08-0322</p>
 
+<h2>Introduction</h2>
+<p>N2812=08-0322 describes a safety problem with rvalue references that can cause unintentional modification of lvalues. The problem is summarized below; however, please read N2812 for a comprehensive discussion of the motivation behind this change. This paper provides proposed wording that fixes the safety problem in both the language and in the library. Specifically, this paper proposes XXX changes:</p>
+<ul>
+ <li>Rvalue references can no longer bind to lvalues.</li>
+
+ <li>The signatures and implementations of <code>std::forward</code> and <code>std::move</code> are modified to provide the same user interface under the new reference-binding rules.</li>
+
+ <li>Added the concepts <code>LvalueReference</code> and <code>RvalueReference</code>; the former is required for <code>std::forward</code>, the latter for consistency.</li>
+
+ <li>Removed the rvalue-reference <code>swap</code> functions throughout the library. This addresses library issue 884 and follows the guidance of an informal vote of the LWG to remove these functions.</li>
+
+ <li>Added missing <code>Swappable</code> requirements to <code>tuple</code>'s <code>swap</code>.</li>
+
+ <li>Added an additional <code>operator*</code> associated function to the <code>Iterator</code> and <code>HasDereference</code> concepts to permit dereferencing lvalue iterators.</li>
+</ul>
+
+
 <h2>Proposed Wording</h2>
 
 <h3>5.2.9 Static cast [expr.static.cast]</h3>
@@ -122,6 +145,16 @@
   </ul></li>
 </ol>
 
+<h3>20.1.1 Type transformations [concept.transform]</h3>
+<p>Modify the <code>RvalueOf</code> concept as follows:</p>
+
+<pre>
+auto concept RvalueOf&lt;typename T&gt; {
+ typename type = T&amp;&amp;;
+ requires <ins>Explicitly</ins>Convertible&lt;T&amp;, type&gt; &amp;&amp; Convertible&lt;T&amp;&amp;, type&gt;;
+}
+</pre>
+
 <p>Add the following new section</p>
 <h3><ins>20.1.2 Type classifications [concept.classify]</ins></h3>
 <ol>
@@ -147,6 +180,35 @@
   reference type.</ins></li>
 </ol>
 
+<h3>20.1.3 Operator concepts [concept.operator]</h3>
+<p>Modify the <code>HasDereference</code> concept as follows:</p>
+
+<pre>
+auto concept HasDereference&lt;typename T&gt; {
+ typename result_type;
+ <ins>result_type operator*(T&amp;);</ins>
+ result_type operator*(T&amp;&amp;);
+}
+</pre>
+
+<p>Modify the <code>HasSubscript</code> concept as follows:</p>
+<pre>
+auto concept HasSubscript&lt;typename T, typename U&gt; {
+ typename result_type;
+ <ins>result_type operator[](T&amp;, const U&amp;);</ins>
+ result_type operator[](T&amp;&amp;, const U&amp;);
+}
+</pre>
+
+<p>Modify the <code>Callable</code> concept as follows:</p>
+<pre>
+auto concept Callable&lt;typename F, typename... Args&gt; {
+ typename result_type;
+ <ins>result_type operator()(F&amp;, Args...);</ins>
+ result_type operator()(F&amp;&amp;, Args...);
+}
+</pre>
+
 <h3>20.2.2 forward/move helpers [forward]</h3>
 <p>Change the definitions of <code>forward</code> and
 <code>move</code> as follows:</p>
@@ -365,6 +427,309 @@
   <li><i>Effects</i>: x.swap(y) </li>
 </ol>
 
+<h3>23.2.4 Class template list [list]</h3>
+<p>Change the declaration of list's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(list&lt;T,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.2.4.5 list specialized algorithms [list.special]</h3>
+<p>Change the declaration of list's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;ValueType T, class Alloc&gt;
+ void swap(list&lt;T,Alloc&gt;&amp; x, list&lt;T,Alloc&gt;&amp; y);
+<del>template &lt;ValueType T, class Alloc&gt;</del>
+ <del>void swap(list&lt;T,Alloc&gt;&amp;&amp; x, list&lt;T,Alloc&gt;&amp; y);</del>
+<del>template &lt;ValueType T, class Alloc&gt;</del>
+ <del>void swap(list&lt;T,Alloc&gt;&amp; x, list&lt;T,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+<ol>
+ <li><i>Effects:</i> x.swap(y); </li>
+</ol>
+
+<h3>23.2.5.1.1 queue definition [queue.defn]</h3>
+<p>Change the definition of queue's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(queue&amp;<del>&amp;</del> q) { swap(c, q.c); }
+</pre>
+
+<h3>23.2.5.1.3 queue specialized algorithms [queue.special]</h3>
+<p>Change the declaration of queue's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;ObjectType T, Swappable Cont&gt;
+ void swap(queue&lt;T, Cont&gt;&amp; x, queue&lt;T, Cont&gt;&amp; y);
+<del>template &lt;ObjectType T, Swappable Cont&gt;</del>
+ <del>void swap(queue&lt;T, Cont&gt;&amp;&amp; x, queue&lt;T, Cont&gt;&amp; y);</del>
+<del>template &lt;ObjectType T, Swappable Cont&gt;</del>
+ <del>void swap(queue&lt;T, Cont&gt;&amp; x, queue&lt;T, Cont&gt;&amp;&amp; y);</del>
+</pre>
+
+<ol>
+ <li><i>Effects</i>: x.swap(y).</li>
+</ol>
+
+<h3>23.2.5.2 Class template priority_queue [priority.queue]</h3>
+<p>Change the declaration of priority_queue's <code>swap</code> as follows:</p>
+
+<pre>
+requires Swappable&lt;Cont&gt;
+ void swap(priority_queue&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.2.5.2.3 priority_queue specialized algorithms [priqueue.special]</h3>
+<p>Change the declaration of priority_queue's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;class T, Swappable Cont, Swappable Compare&gt;
+ void swap(priority_queue&lt;T, Cont, Compare&gt;&amp; x, priority_queue&lt;T, Cont, Compare&gt;&amp; y);
+<del>template &lt;class T, Swappable Cont, Swappable Compare&gt;</del>
+ <del>void swap(priority_queue&lt;T, Cont, Compare&gt;&amp;&amp; x, priority_queue&lt;T, Cont, Compare&gt;&amp; y);</del>
+<del>template &lt;class T, Swappable Cont, Swappable Compare&gt;</del>
+ <del>void swap(priority_queue&lt;T, Cont, Compare&gt;&amp; x, priority_queue&lt;T, Cont, Compare&gt;&amp;&amp; y);</del>
+</pre>
+
+<ol>
+ <li><i>Effects</i>: x.swap(y).</li>
+</ol>
+
+<h3>23.2.5.3.1 stack definition [stack.defn]</h3>
+<p>Change the definition of stack's <code>swap</code> as follows:</p>
+
+<pre>
+requires Swappable&lt;Cont&gt;
+ void swap(stack&amp;<del>&amp;</del> s) { swap(c, s.c); }
+</pre>
+
+<h3>23.2.5.3.3 stack specialized algorithms [stack.special]</h3>
+
+<pre>
+template &lt;ObjectType T, Swappable Cont&gt;
+ void swap(stack&lt;T, Cont&gt;&amp; x, stack&lt;T, Cont&gt;&amp; y);
+<del>template &lt;ObjectType T, Swappable Cont&gt;</del>
+ <del>void swap(stack&lt;T, Cont&gt;&amp;&amp; x, stack&lt;T, Cont&gt;&amp; y);</del>
+<del>template &lt;ObjectType T, Swappable Cont&gt;</del>
+ <del>void swap(stack&lt;T, Cont&gt;&amp; x, stack&lt;T, Cont&gt;&amp;&amp; y);</del>
+</pre>
+<ol>
+ <li><i>Effects</i>: x.swap(y).</li>
+</ol>
+
+<h3>23.2.6 Class template vector [vector]</h3>
+<p>Change the declaration of vector's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(vector&lt;T,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.2.6.2 vector capacity [vector.capacity]</h3>
+<p>Modify the declaration of vector's <code>swap</code> prior to paragraph 8 as follows:</p>
+
+<pre>
+ void swap(vector&lt;T,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.2.6.5 vector specialized algorithms [vector.special]</h3>
+<p>Change the declaration of vector's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;ValueType T, class Alloc&gt;
+ void swap(vector&lt;T,Alloc&gt;&amp; x, vector&lt;T,Alloc&gt;&amp; y);
+<del>template &lt;ValueType T, class Alloc&gt;</del>
+ <del>void swap(vector&lt;T,Alloc&gt;&amp;&amp; x, vector&lt;T,Alloc&gt;&amp;</del> y);
+<del>template &lt;ValueType T, class Alloc&gt;</del>
+ <del>void swap(vector&lt;T,Alloc&gt;&amp; x, vector&lt;T,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+
+<ol>
+ <li>Effects: x.swap(y);</li>
+</ol>
+
+<h3>23.2.7 Class vector&lt;bool&gt; [vector.bool]</h3>
+<p>Change the declaration of vector&lt;bool&gt;'s <code>swap</code> as follows:</p>
+
+<pre>
+void swap(vector&lt;bool,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.3.1 Class template map [map]</h3>
+<p>Change the declaration of map's <code>swap</code> as follows:</p>
+
+<pre>
+void swap(map&lt;Key,T,Compare,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.3.1.5 map specialized algorithms [map.special]</h3>
+<p>Remove map's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;
+ void swap(map&lt;Key,T,Compare,Alloc&gt;&amp; x,
+ map&lt;Key,T,Compare,Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(map&lt;Key,T,Compare,Alloc&gt;&amp;&amp; x,</del>
+ <del>map&lt;Key,T,Compare,Alloc&gt;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(map&lt;Key,T,Compare,Alloc&gt;&amp; x,</del>
+ <del>map&lt;Key,T,Compare,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>23.3.2 Class template multimap [multimap]</h3>
+<p>Change the declaration of multimap's <code>swap</code> as follows:</p>
+
+<pre>
+void swap(multimap&lt;Key,T,Compare,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.3.2.4 multimap specialized algorithms [multimap.special]</h3>
+<p>Remove multimap's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;
+ void swap(multimap&lt;Key,T,Compare,Alloc&gt;&amp; x,
+ multimap&lt;Key,T,Compare,Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(multimap&lt;Key,T,Compare,Alloc&gt;&amp;&amp; x,</del>
+ <del>multimap&lt;Key,T,Compare,Alloc&gt;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(multimap&lt;Key,T,Compare,Alloc&gt;&amp; x,</del>
+ <del>multimap&lt;Key,T,Compare,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>23.3.3 Class template set [set]</h3>
+<p>Change the declaration of set's <code>swap</code> as follows:</p>
+
+<pre>
+void swap(set&lt;Key,T,Compare,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.3.3.2 set specialized algorithms [set.special]</h3>
+<p>Remove set's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;
+ void swap(set&lt;Key,T,Compare,Alloc&gt;&amp; x,
+ set&lt;Key,T,Compare,Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(set&lt;Key,T,Compare,Alloc&gt;&amp;&amp; x,</del>
+ <del>set&lt;Key,T,Compare,Alloc&gt;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(set&lt;Key,T,Compare,Alloc&gt;&amp; x,</del>
+ <del>set&lt;Key,T,Compare,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>23.3.4 Class template multiset [multiset]</h3>
+<p>Change the declaration of multiset's <code>swap</code> as follows:</p>
+
+<pre>
+void swap(multiset&lt;Key,T,Compare,Alloc&gt;&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.3.4.2 multiset specialized algorithms [multiset.special]</h3>
+<p>Remove multiset's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;
+ void swap(multiset&lt;Key,T,Compare,Alloc&gt;&amp; x,
+ multiset&lt;Key,T,Compare,Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(multiset&lt;Key,T,Compare,Alloc&gt;&amp;&amp; x,</del>
+ <del>multiset&lt;Key,T,Compare,Alloc&gt;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Compare, class Alloc&gt;</del>
+ <del>void swap(multiset&lt;Key,T,Compare,Alloc&gt;&amp; x,</del>
+ <del>multiset&lt;Key,T,Compare,Alloc&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>23.4.1 Class template unordered_map [unord.map]</h3>
+<p>Change the declaration of unordered_map's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unordered_map&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.4.1.3 unordered_map swap [unord.map.swap]</h3>
+<p>Remove unordered_map's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,</del>
+ <del>unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,</del>
+ <del>unordered_map&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</del>
+</pre>
+
+<h3>23.4.2 Class template unordered_multimap [unord.multimap]</h3>
+<p>Change the declaration of unordered_multimap's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unordered_multimap&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.4.2.2 unordered_multimap swap [unord.multimap.swap]</h3>
+<p>Remove unordered_multimap's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,</del>
+ <del>unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,</del>
+ <del>unordered_multimap&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</del>
+</pre>
+
+<h3>23.4.3 Class template unordered_set [unord.set]</h3>
+<p>Change the declaration of unordered_set's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unordered_set&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.4.3.2 unordered_set swap [unord.set.swap]</h3>
+<p>Remove unordered_set's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,</del>
+ <del>unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,</del>
+ <del>unordered_set&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</del>
+</pre>
+
+<h3>23.4.4 Class template unordered_multiset [unord.multiset]</h3>
+<p>Change the declaration of unordered_multiset's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unordered_multiset&amp;<del>&amp;</del>);
+</pre>
+
+<h3>23.4.4.2 unordered_multiset swap [unord.multiset.swap]</h3>
+<p>Remove unordered_multiset's <code>swap</code> algorithms that operate on rvalue references:</p>
+
+<pre>
+template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;
+ void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,
+ unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; x,</del>
+ <del>unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; y);</del>
+<del>template &lt;ValueType Key, ValueType T, class Hash, class Pred, class Alloc&gt;</del>
+ <del>void swap(unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp;&amp; x,</del>
+ <del>unordered_multiset&lt;Key, T, Hash, Pred, Alloc&gt;&amp; y);</del>
+</pre>
 
 <h3>24.1.1 Iterator [iterator.iterators]</h3>
 <p>Change the iterator concept as follows:</p>
@@ -380,7 +745,415 @@
 }
 </pre>
 
+<h3>26.5.2 Class template valarray [template.valarray]</h3>
+<p>Change the declaration of valarray's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(valarray&amp;<del>&amp;</del>);
+</pre>
+
+<h3>26.5.2.7 valarray member functions [valarray.members]</h3>
+<p>Change the declaration of valarray's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(valarray&amp;<del>&amp;</del>);
+</pre>
+
+<h3>26.5.3.4 valarray specialized algorithms [valarray.special]</h3>
+<p>Remove valarray's <code>swap</code> specialized algorithms that use rvalue references as follows:</p>
+
+<pre>
+template &lt;class T&gt; void swap(valarray&lt;T&gt;&amp; x, valarray&lt;T&gt;&amp; y);
+<del>template &lt;class T&gt; void swap(valarray&lt;T&gt;&amp;&amp; x, valarray&lt;T&gt;&amp; y);</del>
+<del>template &lt;class T&gt; void swap(valarray&lt;T&gt;&amp; x, valarray&lt;T&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.4.4 Class template basic_ios [ios]</h3>
+<p>Change the declaration of basic_ios's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_ios&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.4.4.2 Member functions [basic.ios.members]</h3>
+<p>Modify the declaration of basic_ios's <code>swap</code> prior to paragraph 21 as follows:</p>
+
+<pre>
+ void swap(basic_ios&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.5.2 Class template basic_streambuf<charT,traits> [streambuf]</h3>
+<p>Change the declaration of basic_streambuf's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_streambuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.5.2.3.1 Assignment [streambuf.assign]</h3>
+<p>Change the declaration of basic_streambuf's <code>swap</code> before paragraph 4 as follows:</p>
+
+<pre>
+ void swap(basic_streambuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.6.1.1 Class template basic_istream [istream]</h3>
+<p>Change the declaration of basic_istream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_istream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.6.1.1.2 Class basic_istream assign and swap [istream.assign]</h3>
+<p>Change the declaration of basic_istream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_istream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Remove the rvalue-reference overloads of basic_istream's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_istream&lt;charT, traits&gt;&amp; x, basic_istream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_istream&lt;charT, traits&gt;&amp;&amp; x, basic_istream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_istream&lt;charT, traits&gt;&amp; x, basic_istream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.6.1.5 Class template basic_iostream [iostreamclass]</h3>
+<p>Change the declaration of basic_iostream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_iostream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.6.1.5.3 basic_iostream assign and swap [iostream.assign]</h3>
+<p>Change the declaration of basic_iostream's <code>swap</code> prior to paragraph 2 as follows:</p>
+
+<pre>
+ void swap(basic_iostream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_iostream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_iostream&lt;charT, traits&gt;&amp; x, basic_iostream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_iostream&lt;charT, traits&gt;&amp;&amp; x, basic_iostream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_iostream&lt;charT, traits&gt;&amp; x, basic_iostream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.6.2.1 Class template basic_ostream [ostream]</h3>
+<p>Change the declaration of basic_ostream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_ostream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.6.2.3 Class basic_ostream assign and swap [ostream.assign]</h3>
+<p>Change the declaration of basic_ostream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_ostream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ostream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_ostream&lt;charT, traits&gt;&amp; x, basic_ostream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ostream&lt;charT, traits&gt;&amp;&amp; x, basic_ostream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ostream&lt;charT, traits&gt;&amp; x, basic_ostream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.7.1 Class template basic_stringbuf [stringbuf]</h3>
+<p>Change the declaration of basic_stringbuf's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_stringbuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.7.1.2 Assign and swap [stringbuf.assign]</h3>
+<p>Change the declaration of basic_stringbuf's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_stringbuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_stringbuf's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits, class Allocator&gt;
+ void swap(basic_stringbuf&lt;charT, traits, Allocator&gt;&amp; x,
+ basic_stringbuf&lt;charT, traits, Allocator&gt;&amp; y);
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_stringbuf&lt;charT, traits, Allocator&gt;&amp;&amp; x,</del>
+ <del>basic_stringbuf&lt;charT, traits, Allocator&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_stringbuf&lt;charT, traits, Allocator&gt;&amp; x,</del>
+ <del>basic_stringbuf&lt;charT, traits, Allocator&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.7.2 Class template basic_istringstream [istringstream]</h3>
+<p>Change the declaration of basic_istringstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_istringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.7.2.2 Assign and swap [istringstream.assign]</h3>
+
+<p>Change the declaration of basic_istringstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_istringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_istringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits, class Allocator&gt;
+ void swap(basic_istringstream&lt;charT, traits, Allocator&gt;&amp; x,
+ basic_istringstream&lt;charT, traits, Allocator&gt;&amp; y);
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_istringstream&lt;charT, traits, Allocator&gt;&amp;&amp; x,</del>
+ <del>basic_istringstream&lt;charT, traits, Allocator&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_istringstream&lt;charT, traits, Allocator&gt;&amp; x,</del>
+ <del>basic_istringstream&lt;charT, traits, Allocator&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.7.3 Class template basic_ostringstream [ostringstream]</h3>
+<p>Change the declaration of basic_ostringstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_ostringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.7.3.2 Assign and swap [ostringstream.assign]</h3>
+
+<p>Change the declaration of basic_ostringstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_ostringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ostringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits, class Allocator&gt;
+ void swap(basic_ostringstream&lt;charT, traits, Allocator&gt;&amp; x,
+ basic_ostringstream&lt;charT, traits, Allocator&gt;&amp; y);
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_ostringstream&lt;charT, traits, Allocator&gt;&amp;&amp; x,</del>
+ <del>basic_ostringstream&lt;charT, traits, Allocator&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_ostringstream&lt;charT, traits, Allocator&gt;&amp; x,</del>
+ <del>basic_ostringstream&lt;charT, traits, Allocator&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.7.4 Class template basic_stringstream [stringstream]</h3>
+<p>Change the declaration of basic_stringstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_stringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.7.4.2 Assign and swap [stringstream.assign]</h3>
+
+<p>Change the declaration of basic_stringstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_stringstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_stringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits, class Allocator&gt;
+ void swap(basic_stringstream&lt;charT, traits, Allocator&gt;&amp; x,
+ basic_stringstream&lt;charT, traits, Allocator&gt;&amp; y);
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_stringstream&lt;charT, traits, Allocator&gt;&amp;&amp; x,</del>
+ <del>basic_stringstream&lt;charT, traits, Allocator&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits, class Allocator&gt;</del>
+ <del>void swap(basic_stringstream&lt;charT, traits, Allocator&gt;&amp; x,</del>
+ <del>basic_stringstream&lt;charT, traits, Allocator&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.8.1.1 Class template basic_filebuf [filebuf]</h3>
+<p>Change the declaration of basic_filebuf's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_filebuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.8.1.3 Assign and swap [filebuf.assign]</h3>
+<p>Change the declaration of basic_filebuf's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_filebuf&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_filebuf's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_filebuf&lt;charT, traits&gt;&amp; x,
+ basic_filebuf&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_filebuf&lt;charT, traits&gt;&amp;&amp; x,</del>
+ <del>basic_filebuf&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_filebuf&lt;charT, traits&gt;&amp; x,</del>
+ <del>basic_filebuf&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.8.1.6 Class template basic_ifstream [ifstream]</h3>
+<p>Change the declaration of basic_ifstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_ifstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.8.1.8 Assign and swap [ifstream.assign]</h3>
+<p>Change the declaration of basic_ifstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_ifstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ifstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_ifstream&lt;charT, traits&gt;&amp; x,
+ basic_ifstream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ifstream&lt;charT, traits&gt;&amp;&amp; x,</del>
+ <del>basic_ifstream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ifstream&lt;charT, traits&gt;&amp; x,</del>
+ <del>basic_ifstream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.8.1.10 Class template basic_ofstream [ofstream]</h3>
+<p>Change the declaration of basic_ofstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_ofstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.8.1.12 Assign and swap [ofstream.assign]</h3>
+<p>Change the declaration of basic_ofstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_ofstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ofstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_ofstream&lt;charT, traits&gt;&amp; x,
+ basic_ofstream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ofstream&lt;charT, traits&gt;&amp;&amp; x,</del>
+ <del>basic_ofstream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_ofstream&lt;charT, traits&gt;&amp; x,</del>
+ <del>basic_ofstream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>27.8.1.14 Class template basic_fstream [fstream]</h3>
+<p>Change the declaration of basic_fstream's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(basic_fstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<h3>27.8.1.16 Assign and swap [fstream.assign]</h3>
+<p>Change the declaration of basic_fstream's <code>swap</code> prior to paragraph 3 as follows:</p>
+
+<pre>
+ void swap(basic_fstream&amp;<del>&amp;</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_fstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template &lt;class charT, class traits&gt;
+ void swap(basic_fstream&lt;charT, traits&gt;&amp; x,
+ basic_fstream&lt;charT, traits&gt;&amp; y);
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_fstream&lt;charT, traits&gt;&amp;&amp; x,</del>
+ <del>basic_fstream&lt;charT, traits&gt;&amp; y);</del>
+<del>template &lt;class charT, class traits&gt;</del>
+ <del>void swap(basic_fstream&lt;charT, traits&gt;&amp; x,</del>
+ <del>basic_fstream&lt;charT, traits&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>30.2.1 Class thread [thread.thread.class]</h3>
+<p>Change the declaration of thread's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(thread&amp;<del>&amp;</del>);
+</pre>
+
+<h3>30.2.1.5 thread members [thread.thread.member]</h3>
+<p>Change the declaration of thread's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(thread&amp;<del>&amp;</del>);
+</pre>
+
+<h3>30.2.1.7 thread specialized algorithms [thread.thread.algorithm]</h3>
+<p>Remove the rvalue-reference overloads of thread's <code>swap</code> as follows:</p>
+
+<pre>
+void swap(thread&amp; x, thread&amp; y);
+<del>void swap(thread&amp;&amp; x, thread&amp; y);</del>
+<del>void swap(thread&amp; x, thread&amp;&amp; y);</del>
+</pre>
+
+<h3>30.3.3.2 Class template unique_lock [thread.lock.unique]</h3>
+<p>Change the declaration of unique_lock's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unique_lock&amp;<del>&amp;</del> u);
+</pre>
+
+<h3>30.3.3.2.3 unique_lock modifiers [thread.lock.unique.mod]</h3>
+<p>Change the declaration of unique_lock's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(unique_lock&amp;<del>&amp;</del> u);
+</pre>
+
+<p>Remove the rvalue-reference overloads of unique_ptr's <code>swap</code> as follows:</p>
+
+<pre>
+template &lt;class Mutex&gt;
+ void swap(unique_lock&lt;Mutex&gt;&amp; x, unique_lock&lt;Mutex&gt;&amp; y);
+<del>template &lt;class Mutex&gt;</del>
+ <del>void swap(unique_lock&lt;Mutex&gt;&amp;&amp; x, unique_lock&lt;Mutex&gt;&amp; y);</del>
+<del>template &lt;class Mutex&gt;</del>
+ <del>void swap(unique_lock&lt;Mutex&gt;&amp; x, unique_lock&lt;Mutex&gt;&amp;&amp; y);</del>
+</pre>
+
+<h3>30.5.8 Class template packaged_task [futures.task]</h3>
+<p>Change the declaration of packaged_task's <code>swap</code> as follows:</p>
+
+<pre>
+ void swap(packaged_task&amp;<del>&amp;</del> other);
+</pre>
+
 <hr>
 <address></address>
-<!-- hhmts start --> Last modified: Thu Feb 5 23:57:33 PST 2009 <!-- hhmts end -->
+<!-- hhmts start --> Last modified: Sat Feb 7 21:43:11 PST 2009 <!-- hhmts end -->
 </body> </html>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk