|
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<typename T> {
+ typename type = T&&;
+ requires <ins>Explicitly</ins>Convertible<T&, type> && Convertible<T&&, type>;
+}
+</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<typename T> {
+ typename result_type;
+ <ins>result_type operator*(T&);</ins>
+ result_type operator*(T&&);
+}
+</pre>
+
+<p>Modify the <code>HasSubscript</code> concept as follows:</p>
+<pre>
+auto concept HasSubscript<typename T, typename U> {
+ typename result_type;
+ <ins>result_type operator[](T&, const U&);</ins>
+ result_type operator[](T&&, const U&);
+}
+</pre>
+
+<p>Modify the <code>Callable</code> concept as follows:</p>
+<pre>
+auto concept Callable<typename F, typename... Args> {
+ typename result_type;
+ <ins>result_type operator()(F&, Args...);</ins>
+ result_type operator()(F&&, 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<T,Alloc>&<del>&</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 <ValueType T, class Alloc>
+ void swap(list<T,Alloc>& x, list<T,Alloc>& y);
+<del>template <ValueType T, class Alloc></del>
+ <del>void swap(list<T,Alloc>&& x, list<T,Alloc>& y);</del>
+<del>template <ValueType T, class Alloc></del>
+ <del>void swap(list<T,Alloc>& x, list<T,Alloc>&& 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&<del>&</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 <ObjectType T, Swappable Cont>
+ void swap(queue<T, Cont>& x, queue<T, Cont>& y);
+<del>template <ObjectType T, Swappable Cont></del>
+ <del>void swap(queue<T, Cont>&& x, queue<T, Cont>& y);</del>
+<del>template <ObjectType T, Swappable Cont></del>
+ <del>void swap(queue<T, Cont>& x, queue<T, Cont>&& 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<Cont>
+ void swap(priority_queue&<del>&</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 <class T, Swappable Cont, Swappable Compare>
+ void swap(priority_queue<T, Cont, Compare>& x, priority_queue<T, Cont, Compare>& y);
+<del>template <class T, Swappable Cont, Swappable Compare></del>
+ <del>void swap(priority_queue<T, Cont, Compare>&& x, priority_queue<T, Cont, Compare>& y);</del>
+<del>template <class T, Swappable Cont, Swappable Compare></del>
+ <del>void swap(priority_queue<T, Cont, Compare>& x, priority_queue<T, Cont, Compare>&& 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<Cont>
+ void swap(stack&<del>&</del> s) { swap(c, s.c); }
+</pre>
+
+<h3>23.2.5.3.3 stack specialized algorithms [stack.special]</h3>
+
+<pre>
+template <ObjectType T, Swappable Cont>
+ void swap(stack<T, Cont>& x, stack<T, Cont>& y);
+<del>template <ObjectType T, Swappable Cont></del>
+ <del>void swap(stack<T, Cont>&& x, stack<T, Cont>& y);</del>
+<del>template <ObjectType T, Swappable Cont></del>
+ <del>void swap(stack<T, Cont>& x, stack<T, Cont>&& 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<T,Alloc>&<del>&</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<T,Alloc>&<del>&</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 <ValueType T, class Alloc>
+ void swap(vector<T,Alloc>& x, vector<T,Alloc>& y);
+<del>template <ValueType T, class Alloc></del>
+ <del>void swap(vector<T,Alloc>&& x, vector<T,Alloc>&</del> y);
+<del>template <ValueType T, class Alloc></del>
+ <del>void swap(vector<T,Alloc>& x, vector<T,Alloc>&& y);</del>
+</pre>
+
+<ol>
+ <li>Effects: x.swap(y);</li>
+</ol>
+
+<h3>23.2.7 Class vector<bool> [vector.bool]</h3>
+<p>Change the declaration of vector<bool>'s <code>swap</code> as follows:</p>
+
+<pre>
+void swap(vector<bool,Alloc>&<del>&</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<Key,T,Compare,Alloc>&<del>&</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 <ValueType Key, ValueType T, class Compare, class Alloc>
+ void swap(map<Key,T,Compare,Alloc>& x,
+ map<Key,T,Compare,Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(map<Key,T,Compare,Alloc>&& x,</del>
+ <del>map<Key,T,Compare,Alloc>& y);</del>
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(map<Key,T,Compare,Alloc>& x,</del>
+ <del>map<Key,T,Compare,Alloc>&& 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<Key,T,Compare,Alloc>&<del>&</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 <ValueType Key, ValueType T, class Compare, class Alloc>
+ void swap(multimap<Key,T,Compare,Alloc>& x,
+ multimap<Key,T,Compare,Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(multimap<Key,T,Compare,Alloc>&& x,</del>
+ <del>multimap<Key,T,Compare,Alloc>& y);</del>
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(multimap<Key,T,Compare,Alloc>& x,</del>
+ <del>multimap<Key,T,Compare,Alloc>&& 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<Key,T,Compare,Alloc>&<del>&</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 <ValueType Key, ValueType T, class Compare, class Alloc>
+ void swap(set<Key,T,Compare,Alloc>& x,
+ set<Key,T,Compare,Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(set<Key,T,Compare,Alloc>&& x,</del>
+ <del>set<Key,T,Compare,Alloc>& y);</del>
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(set<Key,T,Compare,Alloc>& x,</del>
+ <del>set<Key,T,Compare,Alloc>&& 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<Key,T,Compare,Alloc>&<del>&</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 <ValueType Key, ValueType T, class Compare, class Alloc>
+ void swap(multiset<Key,T,Compare,Alloc>& x,
+ multiset<Key,T,Compare,Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(multiset<Key,T,Compare,Alloc>&& x,</del>
+ <del>multiset<Key,T,Compare,Alloc>& y);</del>
+<del>template <ValueType Key, ValueType T, class Compare, class Alloc></del>
+ <del>void swap(multiset<Key,T,Compare,Alloc>& x,</del>
+ <del>multiset<Key,T,Compare,Alloc>&& 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&<del>&</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 <ValueType Key, ValueType T, class Hash, class Pred, class Alloc>
+ void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,
+ unordered_map<Key, T, Hash, Pred, Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_map<Key, T, Hash, Pred, Alloc>& x,</del>
+ <del>unordered_map<Key, T, Hash, Pred, Alloc>&& y);</del>
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_map<Key, T, Hash, Pred, Alloc>&& x,</del>
+ <del>unordered_map<Key, T, Hash, Pred, Alloc>& 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&<del>&</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 <ValueType Key, ValueType T, class Hash, class Pred, class Alloc>
+ void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,
+ unordered_multimap<Key, T, Hash, Pred, Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>& x,</del>
+ <del>unordered_multimap<Key, T, Hash, Pred, Alloc>&& y);</del>
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_multimap<Key, T, Hash, Pred, Alloc>&& x,</del>
+ <del>unordered_multimap<Key, T, Hash, Pred, Alloc>& 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&<del>&</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 <ValueType Key, ValueType T, class Hash, class Pred, class Alloc>
+ void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x,
+ unordered_set<Key, T, Hash, Pred, Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_set<Key, T, Hash, Pred, Alloc>& x,</del>
+ <del>unordered_set<Key, T, Hash, Pred, Alloc>&& y);</del>
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_set<Key, T, Hash, Pred, Alloc>&& x,</del>
+ <del>unordered_set<Key, T, Hash, Pred, Alloc>& 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&<del>&</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 <ValueType Key, ValueType T, class Hash, class Pred, class Alloc>
+ void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x,
+ unordered_multiset<Key, T, Hash, Pred, Alloc>& y);
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>& x,</del>
+ <del>unordered_multiset<Key, T, Hash, Pred, Alloc>&& y);</del>
+<del>template <ValueType Key, ValueType T, class Hash, class Pred, class Alloc></del>
+ <del>void swap(unordered_multiset<Key, T, Hash, Pred, Alloc>&& x,</del>
+ <del>unordered_multiset<Key, T, Hash, Pred, Alloc>& 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&<del>&</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&<del>&</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 <class T> void swap(valarray<T>& x, valarray<T>& y);
+<del>template <class T> void swap(valarray<T>&& x, valarray<T>& y);</del>
+<del>template <class T> void swap(valarray<T>& x, valarray<T>&& 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&<del>&</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&<del>&</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&<del>&</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&<del>&</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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Remove the rvalue-reference overloads of basic_istream's <code>swap</code> as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_istream<charT, traits>& x, basic_istream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_istream<charT, traits>&& x, basic_istream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_istream<charT, traits>& x, basic_istream<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_iostream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_iostream<charT, traits>& x, basic_iostream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_iostream<charT, traits>&& x, basic_iostream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_iostream<charT, traits>& x, basic_iostream<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ostream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_ostream<charT, traits>& x, basic_ostream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ostream<charT, traits>&& x, basic_ostream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ostream<charT, traits>& x, basic_ostream<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_stringbuf's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits, class Allocator>
+ void swap(basic_stringbuf<charT, traits, Allocator>& x,
+ basic_stringbuf<charT, traits, Allocator>& y);
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_stringbuf<charT, traits, Allocator>&& x,</del>
+ <del>basic_stringbuf<charT, traits, Allocator>& y);</del>
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_stringbuf<charT, traits, Allocator>& x,</del>
+ <del>basic_stringbuf<charT, traits, Allocator>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_istringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits, class Allocator>
+ void swap(basic_istringstream<charT, traits, Allocator>& x,
+ basic_istringstream<charT, traits, Allocator>& y);
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_istringstream<charT, traits, Allocator>&& x,</del>
+ <del>basic_istringstream<charT, traits, Allocator>& y);</del>
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_istringstream<charT, traits, Allocator>& x,</del>
+ <del>basic_istringstream<charT, traits, Allocator>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ostringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits, class Allocator>
+ void swap(basic_ostringstream<charT, traits, Allocator>& x,
+ basic_ostringstream<charT, traits, Allocator>& y);
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_ostringstream<charT, traits, Allocator>&& x,</del>
+ <del>basic_ostringstream<charT, traits, Allocator>& y);</del>
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_ostringstream<charT, traits, Allocator>& x,</del>
+ <del>basic_ostringstream<charT, traits, Allocator>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_stringstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits, class Allocator>
+ void swap(basic_stringstream<charT, traits, Allocator>& x,
+ basic_stringstream<charT, traits, Allocator>& y);
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_stringstream<charT, traits, Allocator>&& x,</del>
+ <del>basic_stringstream<charT, traits, Allocator>& y);</del>
+<del>template <class charT, class traits, class Allocator></del>
+ <del>void swap(basic_stringstream<charT, traits, Allocator>& x,</del>
+ <del>basic_stringstream<charT, traits, Allocator>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_filebuf's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_filebuf<charT, traits>& x,
+ basic_filebuf<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_filebuf<charT, traits>&& x,</del>
+ <del>basic_filebuf<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_filebuf<charT, traits>& x,</del>
+ <del>basic_filebuf<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ifstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_ifstream<charT, traits>& x,
+ basic_ifstream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ifstream<charT, traits>&& x,</del>
+ <del>basic_ifstream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ifstream<charT, traits>& x,</del>
+ <del>basic_ifstream<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_ofstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_ofstream<charT, traits>& x,
+ basic_ofstream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ofstream<charT, traits>&& x,</del>
+ <del>basic_ofstream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_ofstream<charT, traits>& x,</del>
+ <del>basic_ofstream<charT, traits>&& 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&<del>&</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&<del>&</del> rhs);
+</pre>
+
+<p>Change the declaration of basic_fstream's <code>swap</code> prior to paragraph 4 as follows:</p>
+
+<pre>
+template <class charT, class traits>
+ void swap(basic_fstream<charT, traits>& x,
+ basic_fstream<charT, traits>& y);
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_fstream<charT, traits>&& x,</del>
+ <del>basic_fstream<charT, traits>& y);</del>
+<del>template <class charT, class traits></del>
+ <del>void swap(basic_fstream<charT, traits>& x,</del>
+ <del>basic_fstream<charT, traits>&& 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&<del>&</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&<del>&</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& x, thread& y);
+<del>void swap(thread&& x, thread& y);</del>
+<del>void swap(thread& x, thread&& 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&<del>&</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&<del>&</del> u);
+</pre>
+
+<p>Remove the rvalue-reference overloads of unique_ptr's <code>swap</code> as follows:</p>
+
+<pre>
+template <class Mutex>
+ void swap(unique_lock<Mutex>& x, unique_lock<Mutex>& y);
+<del>template <class Mutex></del>
+ <del>void swap(unique_lock<Mutex>&& x, unique_lock<Mutex>& y);</del>
+<del>template <class Mutex></del>
+ <del>void swap(unique_lock<Mutex>& x, unique_lock<Mutex>&& 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&<del>&</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