|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51125 - sandbox/committee/rvalue_ref
From: dgregor_at_[hidden]
Date: 2009-02-08 22:59:34
Author: dgregor
Date: 2009-02-08 22:59:33 EST (Sun, 08 Feb 2009)
New Revision: 51125
URL: http://svn.boost.org/trac/boost/changeset/51125
Log:
Address some comments from Howard
Text files modified:
sandbox/committee/rvalue_ref/N2831_fixing_rvalue_refs.html | 53 ++++++++++++++++++++++++++++++++-------
1 files changed, 43 insertions(+), 10 deletions(-)
Modified: sandbox/committee/rvalue_ref/N2831_fixing_rvalue_refs.html
==============================================================================
--- sandbox/committee/rvalue_ref/N2831_fixing_rvalue_refs.html (original)
+++ sandbox/committee/rvalue_ref/N2831_fixing_rvalue_refs.html 2009-02-08 22:59:33 EST (Sun, 08 Feb 2009)
@@ -96,6 +96,8 @@
<li>23.4.4 Class template unordered_multiset [unord.multiset]</li>
<li>23.4.4.2 unordered_multiset swap [unord.multiset.swap]</li>
<li>24.1.1 Iterator [iterator.iterators]</li>
+<li>24.4.3.2.4 move_iterator::operator* [move.iter.op.star]</li>
+<li>24.4.3.2.12 move_iterator::operator[] [move.iter.op.index]</li>
<li>26.5.2 Class template valarray [template.valarray]</li>
<li>26.5.2.7 valarray member functions [valarray.members]</li>
<li>26.5.3.4 valarray specialized algorithms [valarray.special]</li>
@@ -219,7 +221,7 @@
<li>Added new <code>operator<<</code> and <code>operator>></code> overloads that accept an rvalue stream and forward that stream (as an lvalue) to the appropriate operator, so that the C++0x library still supports the use of rvalue streams throughout.<li>
- <li>Reverted <code>getline</code> to its lvalue-only C++03 semantics by removing the use of rvalue references.</li>
+ <li>Split the two <code>getline</code> functions into four functions to support both lvalue and rvalue streams.</li>
</ul>
<a name="implementation"></a><h2>Implementation Experience</h2>
@@ -417,8 +419,9 @@
<pre>
template <IdentityOf T> <ins>requires !LvalueReference<T></ins>
- T&& forward(IdentityOf<T>::type&& t);
- <ins>template <IdentityOf T> T& forward(IdentityOf<T>::type& t);</ins>
+ T&& forward(IdentityOf<T>::type& t);
+ <ins>template <IdentityOf T> requires LvalueReference<T></ins>
+ <ins>T& forward(IdentityOf<T>::type& t);</ins>
</pre>
@@ -603,23 +606,32 @@
const basic_string<charT,traits,Allocator>& str);
</pre>
-<p>Change the declaration of basic_string's <code>getline</code> prior to paragraph 7 as follows:</p>
+<p>Add a second declaration of basic_string's <code>getline</code> prior to paragraph 7 as follows:</p>
<pre>
+<ins>template<class charT, class traits, class Allocator></ins>
+ <ins>basic_istream<charT,traits>&</ins>
+ <ins>getline(basic_istream<charT,traits>& is,</ins>
+ <ins>basic_string<charT,traits,Allocator>& str,</ins>
+ <ins>charT delim);</ins>
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
- getline(basic_istream<charT,traits>&<del>&</del> is,
+ getline(basic_istream<charT,traits>&& is,
basic_string<charT,traits,Allocator>& str,
charT delim);
</pre>
-<p>Change the declaration of basic_string's <code>getline</code> prior to paragraph 11 as follows:</p>
+<p>Add a second declaration of basic_string's <code>getline</code> prior to paragraph 11 as follows:</p>
<pre>
+<ins>template<class charT, class traits, class Allocator></ins>
+ <ins>basic_istream<charT,traits>&</ins>
+ <ins>getline(basic_istream<charT,traits>& is,</ins>
+ <ins>basic_string<charT,traits,Allocator>& str);</ins>
template<class charT, class traits, class Allocator>
basic_istream<charT,traits>&
- getline(basic_istream<charT,traits>&<del>&</del> is,
- basic_string<charT,traits,Allocator>& str)
+ getline(basic_istream<charT,traits>&& is,
+ basic_string<charT,traits,Allocator>& str);
</pre>
<a name="deque"></a><h3>23.2.2 Class template deque [deque]</h3>
@@ -978,13 +990,34 @@
MoveConstructible reference = typename X::reference;
MoveConstructible postincrement_result;
requires HasDereference<postincrement_result>;
+ <ins>reference operator*(X&);</ins>
reference operator*(X&&);
- <ins>reference operator*(X&&);</ins>
X& operator++(X&);
postincrement_result operator++(X&, int);
}
</pre>
+<a name="move.iter.op.star"></a><h3>24.4.3.2.4 move_iterator::operator* [move.iter.op.star]</h3>
+
+<pre>
+reference operator*() const;
+</pre>
+
+<ol>
+ <li><i>Returns</i>: <code><ins>std::move(</ins>*current<ins>)</ins></code><del>, implicitly converted to an rvalue reference</del>.</li>
+</ol>
+
+<a name="move.iter.op.index"></a><h3>24.4.3.2.12 move_iterator::operator[] [move.iter.op.index]</h3>
+
+<pre>
+requires RandomAccessIterator<Iter>
+ unspecified operator[](difference_type n) const;
+</pre>
+
+<ol>
+ <li><i>Returns</i>: <code><ins>std::move(</ins>current[n]<ins>)</ins></code><del>, implicitly converted to an rvalue reference</del>.</li>
+</ol>
+
<a name="template.valarray"></a><h3>26.5.2 Class template valarray [template.valarray]</h3>
<p>Change the declaration of valarray's <code>swap</code> as follows:</p>
@@ -1588,5 +1621,5 @@
<hr>
<address></address>
-<!-- hhmts start --> Last modified: Sun Feb 8 14:17:51 PST 2009 <!-- hhmts end -->
+<!-- hhmts start --> Last modified: Sun Feb 8 19:59:34 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