Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60457 - sandbox/committee/exceptions
From: dgregor_at_[hidden]
Date: 2010-03-10 23:01:15


Author: dgregor
Date: 2010-03-10 23:01:15 EST (Wed, 10 Mar 2010)
New Revision: 60457
URL: http://svn.boost.org/trac/boost/changeset/60457

Log:
Implementations cannot diagnose the use of expressions that may throw
an exception that is not allowed *when the function has a
dynamic-exception-specification*. We don't want to say this for
noexcept-specifications.

Text files modified:
   sandbox/committee/exceptions/d3051.html | 25 ++++++++++++++++++++++---
   sandbox/committee/exceptions/deprecating-exception-specs.rst | 26 +++++++++++++++++++++++---
   2 files changed, 45 insertions(+), 6 deletions(-)

Modified: sandbox/committee/exceptions/d3051.html
==============================================================================
--- sandbox/committee/exceptions/d3051.html (original)
+++ sandbox/committee/exceptions/d3051.html 2010-03-10 23:01:15 EST (Wed, 10 Mar 2010)
@@ -569,7 +569,16 @@
 continue at the call of the function with this
 <i>dynamic-exception-specification</i> (see 15.5.2), or it may call
 <code>std::terminate()</code>.</span></span></p>
-<p>10 <span class="ed">[FIXME: Figure out what to do with p10!]</span></p>
+<p>10 <span class="ed">[Moved to D.5p7]</span> <span class="raw-html"><span class="del">An implementation shall not reject an expression merely because when executed it throws or might throw an exception that the containing function does not allow. [ <i>Example</i>:</span></span></p>
+<blockquote>
+<pre class="literal-block">
+<span class="del">extern void f() throw(X, Y);</span>
+<span class="del">void g() throw(X) {</span>
+ <span class="del">f(); // OK</span>
+<span class="del">}</span>
+</pre>
+</blockquote>
+<p><span class="raw-html"><span class="del">the call to <code>f</code> is well-formed even though when called, <code>f</code> might throw exception <code>Y</code> that <code>g</code> does not allow. - <i>end example</i> ]</span></span></p>
 <p>11 A function with no <em>exception-specification</em>, or with an
 <em>exception-specification</em> of the form <tt class="docutils literal"><span class="pre">noexcept(</span></tt>
 <em>constant-expression</em> <tt class="docutils literal"><span class="pre">)</span></tt> where the <em>constant-expression</em> yields
@@ -614,7 +623,7 @@
 <p>12 An <em>exception-specification</em> is not considered part of a function's
 type.</p>
 <p>13 <span class="ed">[FIXME: Figure out what to do with p13!]</span></p>
-<p>14 <span class="ed">[Moved to D.5p7]</span> <span class="raw-html"><span class="del">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span></span></p>
+<p>14 <span class="ed">[Moved to D.5p8]</span> <span class="raw-html"><span class="del">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span></span></p>
 <p>15 <span class="ed">[FIXME: Figure out what to do with p15! It's unfortunate
 that we're describing noexcept in terms of throw()]</span></p>
 </blockquote>
@@ -682,7 +691,17 @@
 continue at the call of the function with this
 <i><span class="ins">dynamic-</span>exception-specification</i> (see 15.5.2), or it may call
 <code>std::terminate()</code>.</span></p>
-<p>7 <span class="ed">[Moved from 15.4p14]</span> <span class="raw-html">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span></p>
+<p>7 <span class="ed">[Moved from 15.4p10]</span> <span class="raw-html">An implementation shall not reject an expression merely because when executed it throws or might throw an exception that the containing function <span class="ins">whose <i>exception-specification</i> is a <i>dynamic-exception-specification</i></span> does not allow. [<i>Example</i>:</span></p>
+<blockquote>
+<pre class="literal-block">
+extern void f() throw(X, Y);
+void g() throw(X) {
+ f(); // OK
+}
+</pre>
+</blockquote>
+<p><span class="raw-html">the call to <code>f</code> is well-formed even though when called, <code>f</code> might throw exception <code>Y</code> that <code>g</code> does not allow. - <i>end example</i>]</span></p>
+<p>8 <span class="ed">[Moved from 15.4p14]</span> <span class="raw-html">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span></p>
 </blockquote>
 <hr class="docutils" />
 <p>Other notes:</p>

Modified: sandbox/committee/exceptions/deprecating-exception-specs.rst
==============================================================================
--- sandbox/committee/exceptions/deprecating-exception-specs.rst (original)
+++ sandbox/committee/exceptions/deprecating-exception-specs.rst 2010-03-10 23:01:15 EST (Wed, 10 Mar 2010)
@@ -287,7 +287,16 @@
   <i>dynamic-exception-specification</i> (see 15.5.2), or it may call
   <code>std::terminate()</code>.</span>`
 
- 10 :ed:`[FIXME: Figure out what to do with p10!]`
+ 10 :ed:`[Moved to D.5p7]` :raw-html:`<span class="del">An implementation shall not reject an expression merely because when executed it throws or might throw an exception that the containing function does not allow. [ <i>Example</i>:</span>`
+
+ .. parsed-literal::
+
+ :del:`extern void f() throw(X, Y);`
+ :del:`void g() throw(X) {`
+ :del:`f(); // OK`
+ :del:`}`
+
+ :raw-html:`<span class="del">the call to <code>f</code> is well-formed even though when called, <code>f</code> might throw exception <code>Y</code> that <code>g</code> does not allow. - <i>end example</i> ]</span>`
 
   11 A function with no *exception-specification*, or with an
   *exception-specification* of the form ``noexcept(``
@@ -335,7 +344,7 @@
 
   13 :ed:`[FIXME: Figure out what to do with p13!]`
   
- 14 :ed:`[Moved to D.5p7]` :raw-html:`<span class="del">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span>`
+ 14 :ed:`[Moved to D.5p8]` :raw-html:`<span class="del">In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).</span>`
 
   15 :ed:`[FIXME: Figure out what to do with p15! It's unfortunate
   that we're describing noexcept in terms of throw()]`
@@ -413,7 +422,18 @@
   <i><span class="ins">dynamic-</span>exception-specification</i> (see 15.5.2), or it may call
   <code>std::terminate()</code>.`
 
- 7 :ed:`[Moved from 15.4p14]` :raw-html:`In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).`
+ 7 :ed:`[Moved from 15.4p10]` :raw-html:`An implementation shall not reject an expression merely because when executed it throws or might throw an exception that the containing function <span class="ins">whose <i>exception-specification</i> is a <i>dynamic-exception-specification</i></span> does not allow. [<i>Example</i>:`
+
+ .. parsed-literal::
+
+ extern void f() throw(X, Y);
+ void g() throw(X) {
+ f(); // OK
+ }
+
+ :raw-html:`the call to <code>f</code> is well-formed even though when called, <code>f</code> might throw exception <code>Y</code> that <code>g</code> does not allow. - <i>end example</i>]`
+
+ 8 :ed:`[Moved from 15.4p14]` :raw-html:`In a <i>dynamic-exception-specification</i>, a <i>type-id</i> followed by an ellipsis is a pack expansion (14.6.3).`
 
 
 


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