Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57078 - sandbox/committee/rvalue_ref
From: dave_at_[hidden]
Date: 2009-10-22 18:03:10


Author: dave
Date: 2009-10-22 18:03:09 EDT (Thu, 22 Oct 2009)
New Revision: 57078
URL: http://svn.boost.org/trac/boost/changeset/57078

Log:
More edits per Evolution Working Group, preparing to send to Core.

Text files modified:
   sandbox/committee/rvalue_ref/N2983-throwing-move.rst | 56 ++++++++++-----------
   sandbox/committee/rvalue_ref/N2983.html | 101 ++++++++++++++++++---------------------
   2 files changed, 73 insertions(+), 84 deletions(-)

Modified: sandbox/committee/rvalue_ref/N2983-throwing-move.rst
==============================================================================
--- sandbox/committee/rvalue_ref/N2983-throwing-move.rst (original)
+++ sandbox/committee/rvalue_ref/N2983-throwing-move.rst 2009-10-22 18:03:09 EDT (Thu, 22 Oct 2009)
@@ -2,8 +2,8 @@
  Allowing Move Constructors to Throw
 =====================================
 
-:Author: David Abrahams, Rani Sharoni
-:Contact: dave_at_[hidden], rani_sharoni_at_[hidden]
+:Author: David Abrahams, Rani Sharoni, Doug Gregor
+:Contact: dave_at_[hidden], rani_sharoni_at_[hidden], doug.gregor_at_[hidden]
 :organization: `BoostPro Computing`_
 :date: 2009-10-14
 
@@ -218,6 +218,17 @@
 exception specification above is entirely optional; its presence or
 absence doesn't affect the correctness of a move constructor.
 
+operator ``noexcept(``\ *expression*\ ``)``
+*******************************************
+
+It seems that ``has_nothrow_``\ *xxx* traits are proliferating (and
+not just in this proposal). Once we have ``noexcept(``\
+*bool-constant-expr*\ ``)`` available to make the information
+available, it makes sense to generalize the traits into an operator
+similar to ``sizeof`` and ``typeof`` that can give us answers about
+*any* expression.
+
+
 Interactions with Other Proposals
 *********************************
 
@@ -250,31 +261,16 @@
 in the standard. Standardizing ``noexcept(true)`` gives everyone access
 to this optimization tool.
 
-Low-Hanging Fruit
-*****************
-
-There are a couple of additional features we think the committee
-should consider if this proposal is accepted.
-
 Implicit ``noexcept(true)`` for Destructors
-===========================================
+*******************************************
 
 So few destructors can throw exceptions that the default
 exception-specification for destructors could be changed from nothing
-(i.e. ``noexcept(false)``) to ``noexcept(true)`` with only a tiny amount of code
-breakage. Such code is already very dangerous, and where used
-properly, ought to be a well-known “caution area” that is reasonably
-easily migrated.
-
-operator ``noexcept(``\ *expression*\ ``)``
-============================================
-
-It seems that ``has_nothrow_``\ *xxx* traits are proliferating (and
-not just in this proposal). Once we have ``throw(``\
-*bool-constant-expr*\ ``)`` available to make the information
-available, it makes sense to generalize the traits into an operator
-similar to ``sizeof`` and ``typeof`` that can give us answers about
-*any* expression.
+(i.e. ``noexcept(false)``) to ``noexcept(true)`` with only a tiny
+amount of code breakage. Such code is already very dangerous, and
+where used properly, ought to be a well-known “caution area” that is
+reasonably easily migrated. However, we don't think this change would
+be appropriate for C++0x at this late date, so we're not proposing it.
 
 
 Proposed Changes to Standard Wording
@@ -503,13 +499,13 @@
 
 Change paragraph 3 as follows:
 
- :del:`3`:ins:`2` Effects: A directive that informs a vector of a planned change in
- size, so that it can manage the storage allocation
- accordingly. After ``reserve()``, ``capacity()`` is greater or
- equal to the argument of reserve if reallocation happens; and
- equal to the previous value of ``capacity()`` otherwise.
- Reallocation happens at this point if and only if the current
- capacity is less than the argument of ``reserve()``. If an
+ :del:`3`:ins:`2` Effects: A directive that informs a vector of a
+ planned change in size, so that it can manage the storage
+ allocation accordingly. After ``reserve()``, ``capacity()`` is
+ greater or equal to the argument of reserve if reallocation
+ happens; and equal to the previous value of ``capacity()``
+ otherwise. Reallocation happens at this point if and only if the
+ current capacity is less than the argument of ``reserve()``. If an
     exception is thrown :raw-html:`<span class="ins">other than by the
     move constructor of a non-CopyConstructible <code>T</code>` there
     are no effects.

Modified: sandbox/committee/rvalue_ref/N2983.html
==============================================================================
--- sandbox/committee/rvalue_ref/N2983.html (original)
+++ sandbox/committee/rvalue_ref/N2983.html 2009-10-22 18:03:09 EDT (Thu, 22 Oct 2009)
@@ -5,7 +5,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <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="author" content="David Abrahams, Rani Sharoni, Doug Gregor" />
 <meta name="organization" content="BoostPro Computing" />
 <meta name="date" content="2009-10-14" />
 <style type="text/css">
@@ -314,9 +314,9 @@
 <col class="docinfo-content" />
 <tbody valign="top">
 <tr><th class="docinfo-name">Author:</th>
-<td>David Abrahams, Rani Sharoni</td></tr>
+<td>David Abrahams, Rani Sharoni, Doug Gregor</td></tr>
 <tr><th class="docinfo-name">Contact:</th>
-<td><a class="first reference external" href="mailto:dave&#64;boostpro.com">dave&#64;boostpro.com</a>, <a class="last reference external" href="mailto:rani_sharoni&#64;hotmail.com">rani_sharoni&#64;hotmail.com</a></td></tr>
+<td><a class="first reference external" href="mailto:dave&#64;boostpro.com">dave&#64;boostpro.com</a>, <a class="reference external" href="mailto:rani_sharoni&#64;hotmail.com">rani_sharoni&#64;hotmail.com</a>, <a class="last reference external" href="mailto:doug.gregor&#64;gmail.com">doug.gregor&#64;gmail.com</a></td></tr>
 <tr><th class="docinfo-name">Organization:</th>
 <td><a class="first last reference external" href="http://www.boostpro.com">BoostPro Computing</a></td></tr>
 <tr><th class="docinfo-name">Date:</th>
@@ -338,22 +338,19 @@
 <li><a class="reference internal" href="#solution" id="id8">Solution</a></li>
 <li><a class="reference internal" href="#implementing-std-move-if-noexcept" id="id9">Implementing <tt class="docutils literal"><span class="pre">std::move_if_noexcept</span></tt></a></li>
 <li><a class="reference internal" href="#an-optimization-hint" id="id10">An Optimization Hint</a></li>
-<li><a class="reference internal" href="#interactions-with-other-proposals" id="id11">Interactions with Other Proposals</a></li>
-<li><a class="reference internal" href="#existing-practice" id="id12">Existing Practice</a></li>
-<li><a class="reference internal" href="#low-hanging-fruit" id="id13">Low-Hanging Fruit</a><ul>
+<li><a class="reference internal" href="#operator-noexcept-expression" id="id11">operator <tt class="docutils literal"><span class="pre">noexcept(</span></tt><em>expression</em><tt class="docutils literal"><span class="pre">)</span></tt></a></li>
+<li><a class="reference internal" href="#interactions-with-other-proposals" id="id12">Interactions with Other Proposals</a></li>
+<li><a class="reference internal" href="#existing-practice" id="id13">Existing Practice</a></li>
 <li><a class="reference internal" href="#implicit-noexcept-true-for-destructors" id="id14">Implicit <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> for Destructors</a></li>
-<li><a class="reference internal" href="#operator-noexcept-expression" id="id15">operator <tt class="docutils literal"><span class="pre">noexcept(</span></tt><em>expression</em><tt class="docutils literal"><span class="pre">)</span></tt></a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#proposed-changes-to-standard-wording" id="id16">Proposed Changes to Standard Wording</a><ul>
-<li><a class="reference internal" href="#exception-specifications-except-spec" id="id17">15.4 Exception specifications [except.spec]</a></li>
-<li><a class="reference internal" href="#utility-components-utility" id="id18">20.3 Utility components [utility]</a></li>
-<li><a class="reference internal" href="#forward-move-helpers-forward" id="id19">20.3.2 forward/move helpers [forward]</a></li>
-<li><a class="reference internal" href="#header-type-traits-synopsis-meta-type-synop" id="id20">20.6.2 Header <tt class="docutils literal"><span class="pre">&lt;type_traits&gt;</span></tt> synopsis [meta.type.synop]</a></li>
-<li><a class="reference internal" href="#type-properties-meta-unary-prop" id="id21">20.6.4.3 Type properties [meta.unary.prop]</a></li>
-<li><a class="reference internal" href="#deque-modifiers-deque-modifiers" id="id22">23.3.2.3 deque modifiers [deque.modifiers]</a></li>
-<li><a class="reference internal" href="#vector-capacity-vector-capacity" id="id23">23.3.6.2 vector capacity [vector.capacity]</a></li>
-<li><a class="reference internal" href="#vector-modifiers-vector-modifiers" id="id24">23.3.6.4 vector modifiers [vector.modifiers]</a></li>
+<li><a class="reference internal" href="#proposed-changes-to-standard-wording" id="id15">Proposed Changes to Standard Wording</a><ul>
+<li><a class="reference internal" href="#exception-specifications-except-spec" id="id16">15.4 Exception specifications [except.spec]</a></li>
+<li><a class="reference internal" href="#utility-components-utility" id="id17">20.3 Utility components [utility]</a></li>
+<li><a class="reference internal" href="#forward-move-helpers-forward" id="id18">20.3.2 forward/move helpers [forward]</a></li>
+<li><a class="reference internal" href="#header-type-traits-synopsis-meta-type-synop" id="id19">20.6.2 Header <tt class="docutils literal"><span class="pre">&lt;type_traits&gt;</span></tt> synopsis [meta.type.synop]</a></li>
+<li><a class="reference internal" href="#type-properties-meta-unary-prop" id="id20">20.6.4.3 Type properties [meta.unary.prop]</a></li>
+<li><a class="reference internal" href="#deque-modifiers-deque-modifiers" id="id21">23.3.2.3 deque modifiers [deque.modifiers]</a></li>
+<li><a class="reference internal" href="#vector-capacity-vector-capacity" id="id22">23.3.6.2 vector capacity [vector.capacity]</a></li>
+<li><a class="reference internal" href="#vector-modifiers-vector-modifiers" id="id23">23.3.6.4 vector modifiers [vector.modifiers]</a></li>
 </ul>
 </li>
 </ul>
@@ -535,8 +532,16 @@
 exception specification above is entirely optional; its presence or
 absence doesn't affect the correctness of a move constructor.</p>
 </div>
+<div class="section" id="operator-noexcept-expression">
+<h1><a class="toc-backref" href="#id11">operator <tt class="docutils literal"><span class="pre">noexcept(</span></tt><em>expression</em><tt class="docutils literal"><span class="pre">)</span></tt></a></h1>
+<p>It seems that <tt class="docutils literal"><span class="pre">has_nothrow_</span></tt><em>xxx</em> traits are proliferating (and
+not just in this proposal). Once we have <tt class="docutils literal"><span class="pre">noexcept(</span></tt><em>bool-constant-expr</em><tt class="docutils literal"><span class="pre">)</span></tt> available to make the information
+available, it makes sense to generalize the traits into an operator
+similar to <tt class="docutils literal"><span class="pre">sizeof</span></tt> and <tt class="docutils literal"><span class="pre">typeof</span></tt> that can give us answers about
+<em>any</em> expression.</p>
+</div>
 <div class="section" id="interactions-with-other-proposals">
-<h1><a class="toc-backref" href="#id11">Interactions with Other Proposals</a></h1>
+<h1><a class="toc-backref" href="#id12">Interactions with Other Proposals</a></h1>
 <p>The generation of default move constructors, first proposed by Bjarne
 Stroustrup in <a class="reference external" href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2904.pdf">N2904</a>, and again by Bjarne Stroustrup and Lawrence
 Crowl in <a class="reference external" href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2953.html">N2953</a>, is harmonious with our proposal. For example, since
@@ -552,7 +557,7 @@
 <tt class="docutils literal"><span class="pre">pair</span></tt>'s move constructor above. We suggest it be dropped.</p>
 </div>
 <div class="section" id="existing-practice">
-<h1><a class="toc-backref" href="#id12">Existing Practice</a></h1>
+<h1><a class="toc-backref" href="#id13">Existing Practice</a></h1>
 <p>The Microsoft compiler has always treated empty
 exception-specifications as though they have the same meaning we
 propose for <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt>. That is, Microsoft omits the
@@ -563,32 +568,20 @@
 in the standard. Standardizing <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> gives everyone access
 to this optimization tool.</p>
 </div>
-<div class="section" id="low-hanging-fruit">
-<h1><a class="toc-backref" href="#id13">Low-Hanging Fruit</a></h1>
-<p>There are a couple of additional features we think the committee
-should consider if this proposal is accepted.</p>
 <div class="section" id="implicit-noexcept-true-for-destructors">
-<h2><a class="toc-backref" href="#id14">Implicit <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> for Destructors</a></h2>
+<h1><a class="toc-backref" href="#id14">Implicit <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> for Destructors</a></h1>
 <p>So few destructors can throw exceptions that the default
 exception-specification for destructors could be changed from nothing
-(i.e. <tt class="docutils literal"><span class="pre">noexcept(false)</span></tt>) to <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> with only a tiny amount of code
-breakage. Such code is already very dangerous, and where used
-properly, ought to be a well-known “caution area” that is reasonably
-easily migrated.</p>
-</div>
-<div class="section" id="operator-noexcept-expression">
-<h2><a class="toc-backref" href="#id15">operator <tt class="docutils literal"><span class="pre">noexcept(</span></tt><em>expression</em><tt class="docutils literal"><span class="pre">)</span></tt></a></h2>
-<p>It seems that <tt class="docutils literal"><span class="pre">has_nothrow_</span></tt><em>xxx</em> traits are proliferating (and
-not just in this proposal). Once we have <tt class="docutils literal"><span class="pre">throw(</span></tt><em>bool-constant-expr</em><tt class="docutils literal"><span class="pre">)</span></tt> available to make the information
-available, it makes sense to generalize the traits into an operator
-similar to <tt class="docutils literal"><span class="pre">sizeof</span></tt> and <tt class="docutils literal"><span class="pre">typeof</span></tt> that can give us answers about
-<em>any</em> expression.</p>
-</div>
+(i.e. <tt class="docutils literal"><span class="pre">noexcept(false)</span></tt>) to <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> with only a tiny
+amount of code breakage. Such code is already very dangerous, and
+where used properly, ought to be a well-known “caution area” that is
+reasonably easily migrated. However, we don't think this change would
+be appropriate for C++0x at this late date, so we're not proposing it.</p>
 </div>
 <div class="section" id="proposed-changes-to-standard-wording">
-<h1><a class="toc-backref" href="#id16">Proposed Changes to Standard Wording</a></h1>
+<h1><a class="toc-backref" href="#id15">Proposed Changes to Standard Wording</a></h1>
 <div class="section" id="exception-specifications-except-spec">
-<h2><a class="toc-backref" href="#id17">15.4 Exception specifications [except.spec]</a></h2>
+<h2><a class="toc-backref" href="#id16">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
@@ -646,7 +639,7 @@
 </blockquote>
 </div>
 <div class="section" id="utility-components-utility">
-<h2><a class="toc-backref" href="#id18">20.3 Utility components [utility]</a></h2>
+<h2><a class="toc-backref" href="#id17">20.3 Utility components [utility]</a></h2>
 <p>Change Header <tt class="docutils literal"><span class="pre">&lt;utility&gt;</span></tt> synopsis as follows:</p>
 <pre class="literal-block">
 // 20.3.2, forward/move:
@@ -659,7 +652,7 @@
 </pre>
 </div>
 <div class="section" id="forward-move-helpers-forward">
-<h2><a class="toc-backref" href="#id19">20.3.2 forward/move helpers [forward]</a></h2>
+<h2><a class="toc-backref" href="#id18">20.3.2 forward/move helpers [forward]</a></h2>
 <p>Append the following:</p>
 <blockquote>
 <pre class="literal-block">
@@ -671,7 +664,7 @@
 </blockquote>
 </div>
 <div class="section" id="header-type-traits-synopsis-meta-type-synop">
-<h2><a class="toc-backref" href="#id20">20.6.2 Header <tt class="docutils literal"><span class="pre">&lt;type_traits&gt;</span></tt> synopsis [meta.type.synop]</a></h2>
+<h2><a class="toc-backref" href="#id19">20.6.2 Header <tt class="docutils literal"><span class="pre">&lt;type_traits&gt;</span></tt> synopsis [meta.type.synop]</a></h2>
 <pre class="literal-block">
 template &lt;class T&gt; struct has_nothrow_assign;
 <span class="ins">template &lt;class T&gt; struct has_move_constructor;
@@ -688,7 +681,7 @@
 </pre>
 </div>
 <div class="section" id="type-properties-meta-unary-prop">
-<h2><a class="toc-backref" href="#id21">20.6.4.3 Type properties [meta.unary.prop]</a></h2>
+<h2><a class="toc-backref" href="#id20">20.6.4.3 Type properties [meta.unary.prop]</a></h2>
 <p>Add entries to table 43:</p>
 <table border="1" class="docutils">
 <colgroup>
@@ -756,7 +749,7 @@
 </table>
 </div>
 <div class="section" id="deque-modifiers-deque-modifiers">
-<h2><a class="toc-backref" href="#id22">23.3.2.3 deque modifiers [deque.modifiers]</a></h2>
+<h2><a class="toc-backref" href="#id21">23.3.2.3 deque modifiers [deque.modifiers]</a></h2>
 <p>Context:</p>
 <pre class="literal-block">
 iterator insert(const_iterator position, const T&amp; x);
@@ -795,7 +788,7 @@
 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="#id23">23.3.6.2 vector capacity [vector.capacity]</a></h2>
+<h2><a class="toc-backref" href="#id22">23.3.6.2 vector capacity [vector.capacity]</a></h2>
 <p>Context:</p>
 <pre class="literal-block">
 void reserve(size_type n);
@@ -806,13 +799,13 @@
 constructor shall not throw any exceptions.</span></blockquote>
 <p>Change paragraph 3 as follows:</p>
 <blockquote>
-<span class="del">3</span><span class="ins">2</span> 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
+<span class="del">3</span><span class="ins">2</span> 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 a non-CopyConstructible <code>T</code></span> there
 are no effects.</blockquote>
@@ -828,7 +821,7 @@
 <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="#id24">23.3.6.4 vector modifiers [vector.modifiers]</a></h2>
+<h2><a class="toc-backref" href="#id23">23.3.6.4 vector modifiers [vector.modifiers]</a></h2>
 <p>Change the section as follows:</p>
 <blockquote>
 <pre class="literal-block">


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