|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56883 - sandbox/committee/rvalue_ref
From: dave_at_[hidden]
Date: 2009-10-15 20:46:56
Author: dave
Date: 2009-10-15 20:46:55 EDT (Thu, 15 Oct 2009)
New Revision: 56883
URL: http://svn.boost.org/trac/boost/changeset/56883
Log:
Hacked CSS and Rani's text into submission
Text files modified:
sandbox/committee/rvalue_ref/N2983.html | 217 +++++++++++++++++++++++++++++++++++++--
sandbox/committee/rvalue_ref/rst.css | 4
2 files changed, 207 insertions(+), 14 deletions(-)
Modified: sandbox/committee/rvalue_ref/N2983.html
==============================================================================
--- sandbox/committee/rvalue_ref/N2983.html (original)
+++ sandbox/committee/rvalue_ref/N2983.html 2009-10-15 20:46:55 EDT (Thu, 15 Oct 2009)
@@ -6,12 +6,14 @@
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Allowing Move Constructors to Throw</title>
<meta name="author" content="David Abrahams, Rani Sharoni" />
-<meta name="organization" content="BoostPro Computing, Microsoft" />
+<meta name="organization" content="BoostPro Computing" />
<meta name="date" content="2009-10-14" />
<style type="text/css">
@import "http://www.boost.org/doc/libs/1_38_0/rst.css";
-p {text-align:justify}
+div,li {font-family:serif}
+*,li {font-size:12pt}
+p,blockquote {font-family:serif;text-align:justify;font-face:times,serif;font-size:12pt}
li {text-align:justify}
.ins {background-color:#A0FFA0;border-bottom: 1px solid black}
.del {background-color:#FFA0A0;text-decoration:line-through}
@@ -28,9 +30,9 @@
<tr><th class="docinfo-name">Author:</th>
<td>David Abrahams, Rani Sharoni</td></tr>
<tr><th class="docinfo-name">Contact:</th>
-<td><a class="first reference external" href="mailto:dave@boostpro.com">dave@boostpro.com</a>, <a class="last reference external" href="mailto:ranis@microsoft.com">ranis@microsoft.com</a></td></tr>
+<td><a class="first reference external" href="mailto:dave@boostpro.com">dave@boostpro.com</a>, <a class="last reference external" href="mailto:rani_sharoni@hotmail.com">rani_sharoni@hotmail.com</a></td></tr>
<tr><th class="docinfo-name">Organization:</th>
-<td><a class="first reference external" href="http://www.boostpro.com">BoostPro Computing</a>, Microsoft</td></tr>
+<td><a class="first last reference external" href="http://www.boostpro.com">BoostPro Computing</a></td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2009-10-14</td></tr>
<tr class="field"><th class="docinfo-name">Number:</th><td class="field-body">D2983=09-0173</td>
@@ -45,7 +47,16 @@
<li><a class="reference internal" href="#an-optimization-hint" id="id7">An Optimization Hint</a></li>
<li><a class="reference internal" href="#interactions-with-other-proposals" id="id8">Interactions with Other Proposals</a></li>
<li><a class="reference internal" href="#existing-practice" id="id9">Existing Practice</a></li>
-<li><a class="reference internal" href="#proposed-changes-to-standard-wording" id="id10">Proposed Changes to Standard Wording</a></li>
+<li><a class="reference internal" href="#proposed-changes-to-standard-wording" id="id10">Proposed Changes to Standard Wording</a><ul>
+<li><a class="reference internal" href="#exception-specifications-except-spec" id="id11">15.4 Exception specifications [except.spec]</a></li>
+<li><a class="reference internal" href="#a-13-exception-handling-gram-except" id="id12">A.13 Exception handling [gram.except]</a></li>
+<li><a class="reference internal" href="#header-type-traits-synopsis-meta-type-synop" id="id13">20.6.2 Header <type_traits> synopsis [meta.type.synop]</a></li>
+<li><a class="reference internal" href="#type-properties-meta-unary-prop" id="id14">20.6.4.3 Type properties [meta.unary.prop]</a></li>
+<li><a class="reference internal" href="#deque-modifiers-deque-modifiers" id="id15">23.3.2.3 deque modifiers [deque.modifiers]</a></li>
+<li><a class="reference internal" href="#vector-capacity-vector-capacity" id="id16">23.3.6.2 vector capacity [vector.capacity]</a></li>
+<li><a class="reference internal" href="#vector-modifiers-vector-modifiers" id="id17">23.3.6.4 vector modifiers [vector.modifiers]</a></li>
+</ul>
+</li>
</ul>
</div>
<div class="section" id="introduction">
@@ -87,7 +98,7 @@
users. For example, Dinkumware's list implementation currently
derives QOI benefits from having no resource-less stateââbeginâ and
âendâ iterators maintain their relationships even after lists are
-swapped. If throwing move constructors are banned, that would no
+swapped. If throwing move constructors were banned, that would no
longer be possible.</li>
<li>When it is necessary to manually write a move constructor for a
templated class, it would in many cases require either expert-level
@@ -249,17 +260,196 @@
</div>
<div class="section" id="proposed-changes-to-standard-wording">
<h1><a class="toc-backref" href="#id10">Proposed Changes to Standard Wording</a></h1>
-<p>This is some text with <span class="ins">an inserted section</span> and <span class="del">a deleted section</span>.</p>
-<p>To insert and delete in code, use the âparsed-literalâ directive as follows:</p>
+<div class="section" id="exception-specifications-except-spec">
+<h2><a class="toc-backref" href="#id11">15.4 Exception specifications [except.spec]</a></h2>
+<p>Change paragraph 1 as follows:</p>
+<blockquote>
+<p>1 A function declaration lists exceptions that its function might directly
+or indirectly throw by using an exception-specification as a suffix of its
+declarator.</p>
<pre class="literal-block">
-.. parsed-literal::
-
- int foo(:ins:`int`:del:`short` x);
+exception-specification
+ throw ( type-id-listopt )
+ type-id-list:
+ type-id ...opt
+ type-id-list , type-id ...opt
+ <span class="ins">throw( constant-expression )</span>
</pre>
-<p>The result looks like:</p>
+</blockquote>
+<p>Add these paragraphs:</p>
+<blockquote>
+<p><span class="raw-html"><span class="ins">15 In an exception-specification of
+the form <code>throw(</code> <em>constant-expression</em>
+<code>)</code>, the constant-expression shall be a constant
+expression (5.19) that can be contextually converted to
+<code>bool</code> (Clause 4).</span></span></p>
+<p><span class="raw-html"><span class="ins">16 If a function with the
+exception-specification <code>throw(false)</code> throws an
+exception, the behavior is undefined.</span></span></p>
+</blockquote>
+</div>
+<div class="section" id="a-13-exception-handling-gram-except">
+<h2><a class="toc-backref" href="#id12">A.13 Exception handling [gram.except]</a></h2>
<pre class="literal-block">
-int foo(<span class="ins">int</span><span class="del">short</span> x);
+exception-specification
+throw ( type-id-listopt )
+<span class="ins">throw(constant-expression)</span>
</pre>
+</div>
+<div class="section" id="header-type-traits-synopsis-meta-type-synop">
+<h2><a class="toc-backref" href="#id13">20.6.2 Header <type_traits> synopsis [meta.type.synop]</a></h2>
+<pre class="literal-block">
+template <class T> struct has_nothrow_assign;
+<span class="ins">template <class T> struct has_move_constructor;
+template <class T> struct has_nothrow_move_constructor;
+
+template <class T> struct has_move_assign;
+template <class T> struct has_nothrow_move_assign;
+
+template <class T> struct has_copy_constructor;
+template <class T> struct has_default_constructor;
+template <class T> struct has_copy_assign;</span>
+
+template <class T> struct has_virtual_destructor;
+</pre>
+</div>
+<div class="section" id="type-properties-meta-unary-prop">
+<h2><a class="toc-backref" href="#id14">20.6.4.3 Type properties [meta.unary.prop]</a></h2>
+<p>Add entries to table 43:</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="38%" />
+<col width="32%" />
+<col width="30%" />
+</colgroup>
+<thead valign="bottom">
+<tr><th class="head">Template</th>
+<th class="head">Condition</th>
+<th class="head">Preconditions</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span> <span class="pre">has_move_constructor;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> has a move
+constructor (17.3.14).</td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> shall be a complete
+type.</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span>
+<span class="pre">has_nothrow_move_constructor;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> is a class type with
+a move constructor that is
+known not to throw any
+exceptions.</td>
+<td><tt class="docutils literal"><span class="pre">has_move_constructor<T></span>
+<span class="pre">::value</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span> <span class="pre">has_move_assign;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> has a move assignment
+operator (17.3.13).</td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> shall be a complete
+type.</td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span>
+<span class="pre">has_nothrow_move_assign;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> is a class type with
+a move assignment operator
+that is known not to throw
+any exceptions.</td>
+<td><tt class="docutils literal"><span class="pre">has_move_assign<T>::</span>
+<span class="pre">value</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span> <span class="pre">has_copy_constructor;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> has a copy
+constructor (12.8).</td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> shall be a complete
+type, an array of unknown
+bound, or (possibly
+cv-qualified) <tt class="docutils literal"><span class="pre">void.</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span>
+<span class="pre">has_default_constructor;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> has a default
+constructor (12.1).</td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> shall be a complete
+type, an array of unknown
+bound, or (possibly
+cv-qualified) <tt class="docutils literal"><span class="pre">void.</span></tt></td>
+</tr>
+<tr><td><tt class="docutils literal"><span class="pre">template</span> <span class="pre"><class</span> <span class="pre">T></span>
+<span class="pre">struct</span> <span class="pre">has_copy_assign;</span></tt></td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> has a copy assignment
+operator (12.8).</td>
+<td><tt class="docutils literal"><span class="pre">T</span></tt> shall be a complete
+type, an array of unknown
+bound, or (possibly
+cv-qualified) <tt class="docutils literal"><span class="pre">void</span></tt>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="deque-modifiers-deque-modifiers">
+<h2><a class="toc-backref" href="#id15">23.3.2.3 deque modifiers [deque.modifiers]</a></h2>
+<p>Change paragraph 2 as follows:</p>
+<blockquote>
+2 Remarks: If an exception is thrown other than by the copy constructor,
+<span class="ins">move constructor, move assignment operator</span>
+or assignment operator of <tt class="docutils literal"><span class="pre">T</span></tt> there are no effects.</blockquote>
+<p>Change paragraph 6 as follows:</p>
+<blockquote>
+6 Throws: Nothing unless an exception is thrown by the copy constructor,
+<span class="ins">move constructor, move assignment operator</span>
+or assignment operator of <tt class="docutils literal"><span class="pre">T</span></tt>.</blockquote>
+</div>
+<div class="section" id="vector-capacity-vector-capacity">
+<h2><a class="toc-backref" href="#id16">23.3.6.2 vector capacity [vector.capacity]</a></h2>
+<p>Remove paragraph 2</p>
+<blockquote>
+<span class="del">2 Requires: If value_type has a move constructor, that constructor shall
+not throw any exceptions.</span></blockquote>
+<p>Change paragraph 3 to say</p>
+<blockquote>
+Effects: A directive that informs a vector of a planned change in
+size, so that it can manage the storage allocation
+accordingly. After <tt class="docutils literal"><span class="pre">reserve()</span></tt>, <tt class="docutils literal"><span class="pre">capacity()</span></tt> is greater or
+equal to the argument of reserve if reallocation happens; and
+equal to the previous value of <tt class="docutils literal"><span class="pre">capacity()</span></tt> otherwise.
+Reallocation happens at this point if and only if the current
+capacity is less than the argument of <tt class="docutils literal"><span class="pre">reserve()</span></tt>. If an
+exception is thrown <span class="raw-html"><span class="ins">other than by the
+move constructor of <code>T</code></span></span> there are no effects.</blockquote>
+<p>Change paragraph 13 to say</p>
+<blockquote>
+If an exception is thrown <span class="raw-html"><span class="ins">other than
+by the move constructor of <code>T</code></span></span> there are no
+effects.</blockquote>
+</div>
+<div class="section" id="vector-modifiers-vector-modifiers">
+<h2><a class="toc-backref" href="#id17">23.3.6.4 vector modifiers [vector.modifiers]</a></h2>
+<p>Delete paragraph 1:</p>
+<blockquote>
+<span class="del">1 Requires: If value_type has a move constructor, that constructor shall
+not throw any exceptions.</span></blockquote>
+<p>Change paragraph 2 as follows:</p>
+<blockquote>
+2 Remarks: Causes reallocation if the new size is greater than the old
+capacity. If no reallocation happens, all the iterators and references
+before the insertion point remain valid. If an exception is thrown other
+than by the copy constructor,
+:ins: <cite>move constructor, move assignment operator</cite>
+or assignment operator of <tt class="docutils literal"><span class="pre">T</span></tt> or by any InputIterator operation there are
+no effects.</blockquote>
+<p>Change paragraph 6 as follows:</p>
+<blockquote>
+6 Throws: Nothing unless an exception is thrown by the copy
+constructor, <span class="ins">move constructor, move assignment operator</span>, or
+assignment operator of <tt class="docutils literal"><span class="pre">T</span></tt>.</blockquote>
<hr class="docutils" />
<table class="docutils footnote" frame="void" id="attribute" rules="none">
<colgroup><col class="label" /><col /></colgroup>
@@ -300,5 +490,6 @@
</table>
</div>
</div>
+</div>
</body>
</html>
Modified: sandbox/committee/rvalue_ref/rst.css
==============================================================================
--- sandbox/committee/rvalue_ref/rst.css (original)
+++ sandbox/committee/rvalue_ref/rst.css 2009-10-15 20:46:55 EDT (Thu, 15 Oct 2009)
@@ -1,5 +1,7 @@
@import "http://www.boost.org/doc/libs/1_38_0/rst.css";
-p {text-align:justify}
+div,li {font-family:serif}
+*,li {font-size:12pt}
+p,blockquote {font-family:serif;text-align:justify;font-face:times,serif;font-size:12pt}
li {text-align:justify}
.ins {background-color:#A0FFA0;border-bottom: 1px solid black}
.del {background-color:#FFA0A0;text-decoration:line-through}
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