Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57085 - sandbox/committee/rvalue_ref
From: dgregor_at_[hidden]
Date: 2009-10-23 00:51:22


Author: dgregor
Date: 2009-10-23 00:51:21 EDT (Fri, 23 Oct 2009)
New Revision: 57085
URL: http://svn.boost.org/trac/boost/changeset/57085

Log:
More tweaks, with help from David Vandevoorde
Text files modified:
   sandbox/committee/rvalue_ref/N2983-throwing-move.rst | 52 +++++++------
   sandbox/committee/rvalue_ref/N2983.html | 157 ++++++++++++++++++++-------------------
   2 files changed, 110 insertions(+), 99 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-23 00:51:21 EDT (Fri, 23 Oct 2009)
@@ -207,8 +207,8 @@
 
     template <class First2, Second2>
     pair( pair<First2,Second2>&& rhs )
- **throw( !is_nothrow_constructible<First,First2&&>::value
- || !is_nothrow_constructible<Second,Second2&&>::value )** [#is_nothrow_constructible]_
+ **noexcept( is_nothrow_constructible<First,First2&&>::value
+ && is_nothrow_constructible<Second,Second2&&>::value )** [#is_nothrow_constructible]_
       : first( move(rhs.first) ),
         second( move(rhs.second) )
     {}
@@ -339,17 +339,19 @@
     :raw-html:`<span class="ins"><i>noexcept-expression</i></span>`
       :raw-html:`<span class="ins">noexcept ( <i>expression</i> )</span>`
 
- 2 :raw-html:`<span class="ins">The result of the noexcept operator is a constant of type <code>bool</code>.</span>`
+ 2 :raw-html:`<span class="ins">The result of the <code>noexcept</code> operator is a constant of type <code>bool</code>.</span>`
 
- 3 :ins:`The result of the noexcept operator is true if evaluating the expression would not require:`
+ 3 :raw-html:`<span class="ins">The result of the <code>noexcept</code> operator is <code>false</code> if in an evaluated context the <i>expression</i> would contain</span>`
 
- * :raw-html:`<span class="ins">A call to a function that does not have an empty <i>exception-specification</i> ([except.spec]).</span>`
+ * :raw-html:`<span class="ins">a potentially evaluated call` [#implicit-call]_ :raw-html:`<span class="ins">to a function, member function, function pointer, or member function pointer that does not have an empty <i>exception-specification</i> ([except.spec]),</span>`
 
- * :raw-html:`<span class="ins">A <i>throw-expression</i> ([except.throw])</span>`
+ * :raw-html:`<span class="ins">a potentially evaluated <i>throw-expression</i> ([except.throw]),</span>`
 
- * :raw-html:`<span class="ins">A <code>dynamic_cast</code> to a reference type that is not a derived-to-base conversion ([expr.dynamic.cast]).</span>`
+ * :raw-html:`<span class="ins">a potentially evaluated <code>dynamic_cast</code> expression ([expr.dynamic.cast]) that requires a run-time check, or</span>`
 
- :ins:`Otherwise, the result is false.`
+ * :raw-html:`<span class="ins">a potentially evaluated <code>typeid</code> expression ([expr.typeid]) applied to an expression whose type is a polymorphic class type ([class.virtual]).</span>`
+
+ :ins:`Otherwise, the result is true.`
 
 14.6.3 Variadic templates [temp.variadic]
 =========================================
@@ -427,6 +429,12 @@
     </blockquote>
     </p>`
 
+ :raw-html:`<span class="ins">In a <i>noexcept-specification</i>, the
+ <i>constant-expression</i>, if supplied, shall be a constant expression
+ ([expr.const]) that is contextually converted to <code>bool</code>
+ ([conv] Clause 4). In what follows, a <i>noexcept-specification</i>
+ <code>noexcept()</code> is equivalent to <code>noexcept(true)</code>.</span>`
+
   7 A function is said to *allow* an exception of type ``E`` if its :raw-html:`<i><span class="ins">dynamic-</span>exception-specification</i>` contains a type ``T`` for which a handler of type ``T`` would be a match (15.3) for an exception of type ``E``.
 
   .. comment :raw-html:`<span class="ins">, if its <i>noexcept-specification</i> is <code>noexcept(false)</code>, or if the function has no <i>exception-specification</i>`.
@@ -435,23 +443,17 @@
 
   14 In :raw-html:`a<span class="del">n</span> <i><span class="ins">dynamic-</span>exception-specification</i>,` a *type-id* followed by an ellipsis is a pack expansion (14.6.3).
 
-Add these paragraphs:
+Add the following new paragraph:
 
- :raw-html:`<span class="ins">15 In a <i>noexcept-specification</i>, the
- <i>constant-expression</i>, if supplied, shall be a constant expression
- (5.19) that is contextually converted to <code>bool</code>
- (Clause 4).</span>`
-
- :raw-html:`<span class="ins">16 If a function with the
- <i>noexcept-specification</i> <code>noexcept(true)</code> throws an
- exception, the behavior is undefined. The <i>exception-specification</i>
- <code>noexcept(true)</code> is in all other respects equivalent to
- <code>throw()</code>. The <i>exception-specification</i>
- <code>noexcept(false)</code> is equivalent to omitting the exception
- specification altogether.</span>`
-
- :raw-html:`<span class="ins">17 <code>noexcept()</code> is
- equivalent to the <i>noexcept-specification</i> <code>noexcept(true)</code>.</span>`
+ :raw-html:`<span class="ins">15 If a function with a
+ <i>noexcept-specification</i> whose <i>constant-expression</i>
+ yields <code>true</code> throws an exception, the behavior is
+ undefined. The <i>exception-specification</i> whose
+ <i>constant-expression</i> yields <code>true</code> is in all
+ other respects equivalent to the <i>exception-specification</i>
+ <code>throw()</code>. The <i>exception-specification</i> whose
+ <i>constant-expression</i> yields <code>false</code> is equivalent
+ to omitting the <i>exception-specification</i> altogether.</span>`
 
 .. comment
 
@@ -719,3 +721,5 @@
    move constructors but with a default constructor and a non-throwing
    swap, by first default-constructing elements in the new array and
    swapping each element into place.
+
+.. [#implicit-call] :raw-html:`<span class="ins">This includes implicit calls, e.g., the call to an allocation function in a <i>new-expression</i>.</span>`

Modified: sandbox/committee/rvalue_ref/N2983.html
==============================================================================
--- sandbox/committee/rvalue_ref/N2983.html (original)
+++ sandbox/committee/rvalue_ref/N2983.html 2009-10-23 00:51:21 EDT (Fri, 23 Oct 2009)
@@ -333,38 +333,38 @@
 <div class="contents topic" id="index">
 <p class="topic-title first">index</p>
 <ul class="simple">
-<li><a class="reference internal" href="#introduction" id="id6">Introduction</a></li>
-<li><a class="reference internal" href="#motivation" id="id7">Motivation</a></li>
-<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="#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="#proposed-changes-to-standard-wording" id="id15">Proposed Changes to Standard Wording</a><ul>
-<li><a class="reference internal" href="#allocation-functions-basic-stc-dynamic-allocation" id="id16">3.7.4.1 Allocation functions [basic.stc.dynamic.allocation]</a></li>
-<li><a class="reference internal" href="#unary-expressions-expr-unary" id="id17">5.3 Unary expressions [expr.unary]</a></li>
-<li><a class="reference internal" href="#new-expr-new" id="id18">5.3.4 New [expr.new]</a></li>
-<li><a class="reference internal" href="#noexcept-operator-expr-unary-noexcept" id="id19">5.3.7 noexcept operator [expr.unary.noexcept]</a></li>
-<li><a class="reference internal" href="#variadic-templates-temp-variadic" id="id20">14.6.3 Variadic templates [temp.variadic]</a></li>
-<li><a class="reference internal" href="#type-dependent-expressions-temp-dep-expr" id="id21">14.7.2.2 Type-dependent expressions [temp.dep.expr]</a></li>
-<li><a class="reference internal" href="#value-dependent-expressions-temp-dep-constexpr" id="id22">14.7.2.3 Value-dependent expressions [temp.dep.constexpr]</a></li>
-<li><a class="reference internal" href="#exception-specifications-except-spec" id="id23">15.4 Exception specifications [except.spec]</a></li>
-<li><a class="reference internal" href="#type-unexpected-handler-unexpected-handler" id="id24">18.8.2.2 Type unexpected_handler [unexpected.handler]</a></li>
-<li><a class="reference internal" href="#utility-components-utility" id="id25">20.3 Utility components [utility]</a></li>
-<li><a class="reference internal" href="#forward-move-helpers-forward" id="id26">20.3.2 forward/move helpers [forward]</a></li>
-<li><a class="reference internal" href="#header-type-traits-synopsis-meta-type-synop" id="id27">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="id28">20.6.4.3 Type properties [meta.unary.prop]</a></li>
-<li><a class="reference internal" href="#deque-modifiers-deque-modifiers" id="id29">23.3.2.3 deque modifiers [deque.modifiers]</a></li>
-<li><a class="reference internal" href="#vector-capacity-vector-capacity" id="id30">23.3.6.2 vector capacity [vector.capacity]</a></li>
-<li><a class="reference internal" href="#vector-modifiers-vector-modifiers" id="id31">23.3.6.4 vector modifiers [vector.modifiers]</a></li>
+<li><a class="reference internal" href="#introduction" id="id7">Introduction</a></li>
+<li><a class="reference internal" href="#motivation" id="id8">Motivation</a></li>
+<li><a class="reference internal" href="#solution" id="id9">Solution</a></li>
+<li><a class="reference internal" href="#implementing-std-move-if-noexcept" id="id10">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="id11">An Optimization Hint</a></li>
+<li><a class="reference internal" href="#operator-noexcept-expression" id="id12">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="id13">Interactions with Other Proposals</a></li>
+<li><a class="reference internal" href="#existing-practice" id="id14">Existing Practice</a></li>
+<li><a class="reference internal" href="#implicit-noexcept-true-for-destructors" id="id15">Implicit <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> for Destructors</a></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="#allocation-functions-basic-stc-dynamic-allocation" id="id17">3.7.4.1 Allocation functions [basic.stc.dynamic.allocation]</a></li>
+<li><a class="reference internal" href="#unary-expressions-expr-unary" id="id18">5.3 Unary expressions [expr.unary]</a></li>
+<li><a class="reference internal" href="#new-expr-new" id="id19">5.3.4 New [expr.new]</a></li>
+<li><a class="reference internal" href="#noexcept-operator-expr-unary-noexcept" id="id20">5.3.7 noexcept operator [expr.unary.noexcept]</a></li>
+<li><a class="reference internal" href="#variadic-templates-temp-variadic" id="id21">14.6.3 Variadic templates [temp.variadic]</a></li>
+<li><a class="reference internal" href="#type-dependent-expressions-temp-dep-expr" id="id22">14.7.2.2 Type-dependent expressions [temp.dep.expr]</a></li>
+<li><a class="reference internal" href="#value-dependent-expressions-temp-dep-constexpr" id="id23">14.7.2.3 Value-dependent expressions [temp.dep.constexpr]</a></li>
+<li><a class="reference internal" href="#exception-specifications-except-spec" id="id24">15.4 Exception specifications [except.spec]</a></li>
+<li><a class="reference internal" href="#type-unexpected-handler-unexpected-handler" id="id25">18.8.2.2 Type unexpected_handler [unexpected.handler]</a></li>
+<li><a class="reference internal" href="#utility-components-utility" id="id26">20.3 Utility components [utility]</a></li>
+<li><a class="reference internal" href="#forward-move-helpers-forward" id="id27">20.3.2 forward/move helpers [forward]</a></li>
+<li><a class="reference internal" href="#header-type-traits-synopsis-meta-type-synop" id="id28">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="id29">20.6.4.3 Type properties [meta.unary.prop]</a></li>
+<li><a class="reference internal" href="#deque-modifiers-deque-modifiers" id="id30">23.3.2.3 deque modifiers [deque.modifiers]</a></li>
+<li><a class="reference internal" href="#vector-capacity-vector-capacity" id="id31">23.3.6.2 vector capacity [vector.capacity]</a></li>
+<li><a class="reference internal" href="#vector-modifiers-vector-modifiers" id="id32">23.3.6.4 vector modifiers [vector.modifiers]</a></li>
 </ul>
 </li>
 </ul>
 </div>
 <div class="section" id="introduction">
-<h1><a class="toc-backref" href="#id6">Introduction</a></h1>
+<h1><a class="toc-backref" href="#id7">Introduction</a></h1>
 <p>In <a class="reference external" href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2855.html">N2855</a>, Doug Gregor and Dave Abrahams discussed a problematic
 interaction between move constructors, templates, and certain standard
 library member functions. To date, attempts to solve the problem
@@ -372,7 +372,7 @@
 move constructors, and be sure never to generate one</em>.</p>
 </div>
 <div class="section" id="motivation">
-<h1><a class="toc-backref" href="#id7">Motivation</a></h1>
+<h1><a class="toc-backref" href="#id8">Motivation</a></h1>
 <p>Consider, for a moment, the actual magnitude of the problem we're
 addressing: it's a backward-compatibility/code evolution issue that
 only arises when <em>all</em> these conditions are satisfied:</p>
@@ -415,7 +415,7 @@
 </ul>
 </div>
 <div class="section" id="solution">
-<h1><a class="toc-backref" href="#id8">Solution</a></h1>
+<h1><a class="toc-backref" href="#id9">Solution</a></h1>
 <p>Fortunately, there is a better way. Instead of imposing this burden
 on every class author, we can deal with the issue more selectively in
 the operation being move-enabled. There, we know whether a throwing
@@ -476,7 +476,7 @@
 code.</p>
 </div>
 <div class="section" id="implementing-std-move-if-noexcept">
-<h1><a class="toc-backref" href="#id9">Implementing <tt class="docutils literal"><span class="pre">std::move_if_noexcept</span></tt></a></h1>
+<h1><a class="toc-backref" href="#id10">Implementing <tt class="docutils literal"><span class="pre">std::move_if_noexcept</span></tt></a></h1>
 <p>One possible implementation of <tt class="docutils literal"><span class="pre">std::move_if_noexcept</span></tt> might be:</p>
 <pre class="literal-block">
 template &lt;class T&gt;
@@ -500,7 +500,7 @@
 constructor can throw.</p>
 </div>
 <div class="section" id="an-optimization-hint">
-<h1><a class="toc-backref" href="#id10">An Optimization Hint</a></h1>
+<h1><a class="toc-backref" href="#id11">An Optimization Hint</a></h1>
 <p>To help the library deduce the correct result for these traits, we
 propose to add a new kind of exception-specification, spelled:</p>
 <pre class="literal-block">
@@ -529,8 +529,8 @@
 <pre class="literal-block">
 template &lt;class First2, Second2&gt;
 pair( pair&lt;First2,Second2&gt;&amp;&amp; rhs )
- <strong>throw( !is_nothrow_constructible&lt;First,First2&amp;&amp;&gt;::value
- || !is_nothrow_constructible&lt;Second,Second2&amp;&amp;&gt;::value )</strong><a class="footnote-reference" href="#is-nothrow-constructible" id="id5"><sup>4</sup></a>
+ <strong>noexcept( is_nothrow_constructible&lt;First,First2&amp;&amp;&gt;::value
+ &amp;&amp; is_nothrow_constructible&lt;Second,Second2&amp;&amp;&gt;::value )</strong><a class="footnote-reference" href="#is-nothrow-constructible" id="id5"><sup>4</sup></a>
   : first( move(rhs.first) ),
     second( move(rhs.second) )
 {}
@@ -541,7 +541,7 @@
 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>
+<h1><a class="toc-backref" href="#id12">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
@@ -549,7 +549,7 @@
 <em>any</em> expression.</p>
 </div>
 <div class="section" id="interactions-with-other-proposals">
-<h1><a class="toc-backref" href="#id12">Interactions with Other Proposals</a></h1>
+<h1><a class="toc-backref" href="#id13">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
@@ -565,7 +565,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="#id13">Existing Practice</a></h1>
+<h1><a class="toc-backref" href="#id14">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
@@ -577,7 +577,7 @@
 to this optimization tool.</p>
 </div>
 <div class="section" id="implicit-noexcept-true-for-destructors">
-<h1><a class="toc-backref" href="#id14">Implicit <tt class="docutils literal"><span class="pre">noexcept(true)</span></tt> for Destructors</a></h1>
+<h1><a class="toc-backref" href="#id15">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
@@ -587,15 +587,15 @@
 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="#id15">Proposed Changes to Standard Wording</a></h1>
+<h1><a class="toc-backref" href="#id16">Proposed Changes to Standard Wording</a></h1>
 <div class="section" id="allocation-functions-basic-stc-dynamic-allocation">
-<h2><a class="toc-backref" href="#id16">3.7.4.1 Allocation functions [basic.stc.dynamic.allocation]</a></h2>
+<h2><a class="toc-backref" href="#id17">3.7.4.1 Allocation functions [basic.stc.dynamic.allocation]</a></h2>
 <p>Modify paragraph 3 as follows:</p>
 <blockquote>
 3 An allocation function that fails to allocate storage can invoke the currently installed new-handler function (18.6.2.3), if any. [ <em>Note</em>: A program-supplied allocation function can obtain the address of the currently installed new_handler using the <tt class="docutils literal"><span class="pre">std::set_new_handler</span></tt> function (18.6.2.4). -- <em>end note</em> ] If an allocation function declared with an empty <em>exception-specification</em> (15.4), <span class="del">throw(),</span> fails to allocate storage, it shall return a null pointer. Any other allocation function that fails to allocate storage shall indicate failure only by throwing an exception of a type that would match a handler (15.3) of type <tt class="docutils literal"><span class="pre">std::bad_alloc</span></tt> (18.6.2.1).</blockquote>
 </div>
 <div class="section" id="unary-expressions-expr-unary">
-<h2><a class="toc-backref" href="#id17">5.3 Unary expressions [expr.unary]</a></h2>
+<h2><a class="toc-backref" href="#id18">5.3 Unary expressions [expr.unary]</a></h2>
 <p>Modify the grammar in paragraph 1 as follows:</p>
 <blockquote>
 <p>1 Expressions with unary operators group right-to-left.</p>
@@ -616,13 +616,13 @@
 </blockquote>
 </div>
 <div class="section" id="new-expr-new">
-<h2><a class="toc-backref" href="#id18">5.3.4 New [expr.new]</a></h2>
+<h2><a class="toc-backref" href="#id19">5.3.4 New [expr.new]</a></h2>
 <p>Modify paragraph 13 as follows:</p>
 <blockquote>
 13 [Note: unless an allocation function is declared with an empty exception-specification (15.4), <span class="del">throw(),</span> it indicates failure to allocate storage by throwing a <tt class="docutils literal"><span class="pre">std::bad_alloc</span></tt> exception (Clause 15, 18.6.2.1); it returns a non-null pointer otherwise. If the allocation function is declared with an empty <em>exception-specification</em>, <span class="del">throw(),</span> it returns null to indicate failure to allocate storage and a non-null pointer otherwise. -- <em>end note</em>] If the allocation function returns null, initialization shall not be done, the deallocation function shall not be called, and the value of the new-expression shall be null.</blockquote>
 </div>
 <div class="section" id="noexcept-operator-expr-unary-noexcept">
-<h2><a class="toc-backref" href="#id19">5.3.7 noexcept operator [expr.unary.noexcept]</a></h2>
+<h2><a class="toc-backref" href="#id20">5.3.7 noexcept operator [expr.unary.noexcept]</a></h2>
 <p>(Add this new section)</p>
 <blockquote>
 <p>1 <span class="ins">The noexcept operator determines whether the evaluation of its operand, which is an unevaluated operand (Clause 5), can throw an exception ([except.throw]).</span></p>
@@ -630,18 +630,19 @@
 <span class="raw-html"><span class="ins"><i>noexcept-expression</i></span></span>
   <span class="raw-html"><span class="ins">noexcept ( <i>expression</i> )</span></span>
 </pre>
-<p>2 <span class="raw-html"><span class="ins">The result of the noexcept operator is a constant of type <code>bool</code>.</span></span></p>
-<p>3 <span class="ins">The result of the noexcept operator is true if evaluating the expression would not require:</span></p>
+<p>2 <span class="raw-html"><span class="ins">The result of the <code>noexcept</code> operator is a constant of type <code>bool</code>.</span></span></p>
+<p>3 <span class="raw-html"><span class="ins">The result of the <code>noexcept</code> operator is <code>false</code> if in an evaluated context the <i>expression</i> would contain</span></span></p>
 <ul class="simple">
-<li><span class="raw-html"><span class="ins">A call to a function that does not have an empty <i>exception-specification</i> ([except.spec]).</span></span></li>
-<li><span class="raw-html"><span class="ins">A <i>throw-expression</i> ([except.throw])</span></span></li>
-<li><span class="raw-html"><span class="ins">A <code>dynamic_cast</code> to a reference type that is not a derived-to-base conversion ([expr.dynamic.cast]).</span></span></li>
+<li><span class="raw-html"><span class="ins">a potentially evaluated call</span><a class="footnote-reference" href="#implicit-call" id="id6"><sup>6</sup></a> <span class="raw-html"><span class="ins">to a function, member function, function pointer, or member function pointer that does not have an empty <i>exception-specification</i> ([except.spec]),</span></span></li>
+<li><span class="raw-html"><span class="ins">a potentially evaluated <i>throw-expression</i> ([except.throw]),</span></span></li>
+<li><span class="raw-html"><span class="ins">a potentially evaluated <code>dynamic_cast</code> expression ([expr.dynamic.cast]) that requires a run-time check, or</span></span></li>
+<li><span class="raw-html"><span class="ins">a potentially evaluated <code>typeid</code> expression ([expr.typeid]) applied to an expression whose type is a polymorphic class type ([class.virtual]).</span></span></li>
 </ul>
-<p><span class="ins">Otherwise, the result is false.</span></p>
+<p><span class="ins">Otherwise, the result is true.</span></p>
 </blockquote>
 </div>
 <div class="section" id="variadic-templates-temp-variadic">
-<h2><a class="toc-backref" href="#id20">14.6.3 Variadic templates [temp.variadic]</a></h2>
+<h2><a class="toc-backref" href="#id21">14.6.3 Variadic templates [temp.variadic]</a></h2>
 <p>Modify the fifth bullet of paragraph 4 as follows:</p>
 <blockquote>
 <p>4 A <em>pack expansion</em> is a sequence of tokens that names one or more parameter packs, followed by an ellipsis. The sequence of tokens is called the <em>pattern of the expansion</em>; its syntax depends on the context in which the expansion occurs. Pack expansions can occur in the following contexts:</p>
@@ -653,7 +654,7 @@
 </blockquote>
 </div>
 <div class="section" id="type-dependent-expressions-temp-dep-expr">
-<h2><a class="toc-backref" href="#id21">14.7.2.2 Type-dependent expressions [temp.dep.expr]</a></h2>
+<h2><a class="toc-backref" href="#id22">14.7.2.2 Type-dependent expressions [temp.dep.expr]</a></h2>
 <p>Add the following case to the list in paragraph 4:</p>
 <blockquote>
 <p>4 Expressions of the following forms are never type-dependent (because the type of the expression cannot be dependent):</p>
@@ -663,7 +664,7 @@
 </blockquote>
 </div>
 <div class="section" id="value-dependent-expressions-temp-dep-constexpr">
-<h2><a class="toc-backref" href="#id22">14.7.2.3 Value-dependent expressions [temp.dep.constexpr]</a></h2>
+<h2><a class="toc-backref" href="#id23">14.7.2.3 Value-dependent expressions [temp.dep.constexpr]</a></h2>
 <p>Modify paragraph 2 as follows:</p>
 <blockquote>
 <p>2 Expressions of the following form are value-dependent if the <em>unary-expression</em> <span class="raw-html"><span class="ins">or <i>expression</i></span></span> is type-dependent or the <em>type-id</em> is dependent:</p>
@@ -676,7 +677,7 @@
 </blockquote>
 </div>
 <div class="section" id="exception-specifications-except-spec">
-<h2><a class="toc-backref" href="#id23">15.4 Exception specifications [except.spec]</a></h2>
+<h2><a class="toc-backref" href="#id24">15.4 Exception specifications [except.spec]</a></h2>
 <p>Change the following paragraphs as follows:</p>
 <blockquote>
 <p>1 A function declaration lists exceptions that its function might directly
@@ -712,28 +713,28 @@
 <span class="ins"><code>noexcept (</code> <em>constant-expression<span class="sub">opt</span></em> <code>)</code></span>
 </blockquote>
 </p></span></p>
+<p><span class="raw-html"><span class="ins">In a <i>noexcept-specification</i>, the
+<i>constant-expression</i>, if supplied, shall be a constant expression
+([expr.const]) that is contextually converted to <code>bool</code>
+([conv] Clause 4). In what follows, a <i>noexcept-specification</i>
+<code>noexcept()</code> is equivalent to <code>noexcept(true)</code>.</span></span></p>
 </blockquote>
 <p>7 A function is said to <em>allow</em> an exception of type <tt class="docutils literal"><span class="pre">E</span></tt> if its <span class="raw-html"><i><span class="ins">dynamic-</span>exception-specification</i></span> contains a type <tt class="docutils literal"><span class="pre">T</span></tt> for which a handler of type <tt class="docutils literal"><span class="pre">T</span></tt> would be a match (15.3) for an exception of type <tt class="docutils literal"><span class="pre">E</span></tt>.</p>
 <!-- comment :raw-html:`<span class="ins">, if its <i>noexcept-specification</i> is <code>noexcept(false)</code>, or if the function has no <i>exception-specification</i>`. -->
 <p>11 A function with no <em>exception-specification</em> <span class="raw-html"><span class="ins">, or with an <i>exception-specification</i> of the form <code>noexcept(<i>constant-expression</i>)</code> where the <i>constant-expression</i> is <code>false</code>,</span></span> allows all exceptions. <span class="raw-html"><span class="ins">An <i>exception-specification</i> is <i>empty</i> if it is of the form <code>throw()</code>, <code>noexcept()</code>, or <code>noexcept(<i>constant-expression</i>)</code> where the <i>constant-expression</i> is <code>true</code>.</span></span> A function with an empty <em>exception-specification</em> <span class="raw-html"><span class="del">, <code>throw()</code>,</span></span> does not allow any exceptions.</p>
 <p>14 In <span class="raw-html">a<span class="del">n</span> <i><span class="ins">dynamic-</span>exception-specification</i>,</span> a <em>type-id</em> followed by an ellipsis is a pack expansion (14.6.3).</p>
 </blockquote>
-<p>Add these paragraphs:</p>
+<p>Add the following new paragraph:</p>
 <blockquote>
-<p><span class="raw-html"><span class="ins">15 In a <i>noexcept-specification</i>, the
-<i>constant-expression</i>, if supplied, shall be a constant expression
-(5.19) that is 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
-<i>noexcept-specification</i> <code>noexcept(true)</code> throws an
-exception, the behavior is undefined. The <i>exception-specification</i>
-<code>noexcept(true)</code> is in all other respects equivalent to
-<code>throw()</code>. The <i>exception-specification</i>
-<code>noexcept(false)</code> is equivalent to omitting the exception
-specification altogether.</span></span></p>
-<p><span class="raw-html"><span class="ins">17 <code>noexcept()</code> is
-equivalent to the <i>noexcept-specification</i> <code>noexcept(true)</code>.</span></span></p>
-</blockquote>
+<span class="raw-html"><span class="ins">15 If a function with a
+<i>noexcept-specification</i> whose <i>constant-expression</i>
+yields <code>true</code> throws an exception, the behavior is
+undefined. The <i>exception-specification</i> whose
+<i>constant-expression</i> yields <code>true</code> is in all
+other respects equivalent to the <i>exception-specification</i>
+<code>throw()</code>. The <i>exception-specification</i> whose
+<i>constant-expression</i> yields <code>false</code> is equivalent
+to omitting the <i>exception-specification</i> altogether.</span></span></blockquote>
 <!-- comment
 
 17.6.4.10 Restrictions on exception handling [res.on.exception.handling]
@@ -744,13 +745,13 @@
   192) That is, the C library functions can all be treated as if they have :del:`a throw()` :ins:`an empty` exception-specification. This allows implementations to make performance optimizations based on the absence of exceptions at runtime. -->
 </div>
 <div class="section" id="type-unexpected-handler-unexpected-handler">
-<h2><a class="toc-backref" href="#id24">18.8.2.2 Type unexpected_handler [unexpected.handler]</a></h2>
+<h2><a class="toc-backref" href="#id25">18.8.2.2 Type unexpected_handler [unexpected.handler]</a></h2>
 <p>Modify paragraph 1 as follows:</p>
 <blockquote>
 1 The type of a handler function to be called by <tt class="docutils literal"><span class="pre">unexpected()</span></tt> when a function attempts to throw an exception not listed in its <span class="raw-html"><i><span class="ins">dynamic-</span>exception-specification</i>.</span></blockquote>
 </div>
 <div class="section" id="utility-components-utility">
-<h2><a class="toc-backref" href="#id25">20.3 Utility components [utility]</a></h2>
+<h2><a class="toc-backref" href="#id26">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:
@@ -763,7 +764,7 @@
 </pre>
 </div>
 <div class="section" id="forward-move-helpers-forward">
-<h2><a class="toc-backref" href="#id26">20.3.2 forward/move helpers [forward]</a></h2>
+<h2><a class="toc-backref" href="#id27">20.3.2 forward/move helpers [forward]</a></h2>
 <p>Append the following:</p>
 <blockquote>
 <pre class="literal-block">
@@ -775,7 +776,7 @@
 </blockquote>
 </div>
 <div class="section" id="header-type-traits-synopsis-meta-type-synop">
-<h2><a class="toc-backref" href="#id27">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="#id28">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;
@@ -792,7 +793,7 @@
 </pre>
 </div>
 <div class="section" id="type-properties-meta-unary-prop">
-<h2><a class="toc-backref" href="#id28">20.6.4.3 Type properties [meta.unary.prop]</a></h2>
+<h2><a class="toc-backref" href="#id29">20.6.4.3 Type properties [meta.unary.prop]</a></h2>
 <p>Add entries to table 43:</p>
 <table border="1" class="docutils">
 <colgroup>
@@ -860,7 +861,7 @@
 </table>
 </div>
 <div class="section" id="deque-modifiers-deque-modifiers">
-<h2><a class="toc-backref" href="#id29">23.3.2.3 deque modifiers [deque.modifiers]</a></h2>
+<h2><a class="toc-backref" href="#id30">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);
@@ -899,7 +900,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="#id30">23.3.6.2 vector capacity [vector.capacity]</a></h2>
+<h2><a class="toc-backref" href="#id31">23.3.6.2 vector capacity [vector.capacity]</a></h2>
 <p>Context:</p>
 <pre class="literal-block">
 void reserve(size_type n);
@@ -932,7 +933,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="#id31">23.3.6.4 vector modifiers [vector.modifiers]</a></h2>
+<h2><a class="toc-backref" href="#id32">23.3.6.4 vector modifiers [vector.modifiers]</a></h2>
 <p>Change the section as follows:</p>
 <blockquote>
 <pre class="literal-block">
@@ -1022,6 +1023,12 @@
 swapping each element into place.</td></tr>
 </tbody>
 </table>
+<table class="docutils footnote" frame="void" id="implicit-call" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id6">[6]</a></td><td><span class="raw-html"><span class="ins">This includes implicit calls, e.g., the call to an allocation function in a <i>new-expression</i>.</span></span></td></tr>
+</tbody>
+</table>
 </div>
 </div>
 </div>


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