|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74386 - in sandbox/contract/libs/contract/doc/html2: . contract__
From: lorcaminiti_at_[hidden]
Date: 2011-09-15 11:44:07
Author: lcaminiti
Date: 2011-09-15 11:44:07 EDT (Thu, 15 Sep 2011)
New Revision: 74386
URL: http://svn.boost.org/trac/boost/changeset/74386
Log:
Upd.
Text files modified:
sandbox/contract/libs/contract/doc/html2/contract__/grammar.html | 21 ++++++++++++++++-----
sandbox/contract/libs/contract/doc/html2/index.html | 2 +-
2 files changed, 17 insertions(+), 6 deletions(-)
Modified: sandbox/contract/libs/contract/doc/html2/contract__/grammar.html
==============================================================================
--- sandbox/contract/libs/contract/doc/html2/contract__/grammar.html (original)
+++ sandbox/contract/libs/contract/doc/html2/contract__/grammar.html 2011-09-15 11:44:07 EDT (Thu, 15 Sep 2011)
@@ -491,7 +491,7 @@
</p>
<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">vector_error</span> <span class="special">{</span> <span class="special">...</span> <span class="special">};</span>
-<span class="identifier">CONTRACT_CONSTRUCTOR</span><span class="special">(</span>
+<span class="identifier">CONTRACT_CONSTRUCTOR</span><span class="special">(</span> <span class="comment">// Constructor with member initializers.</span>
<span class="keyword">explicit</span> <span class="special">(</span><span class="identifier">vector</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">count</span> <span class="special">)</span>
<span class="identifier">precondition</span><span class="special">(</span> <span class="identifier">count</span> <span class="special">>=</span> <span class="number">0</span> <span class="special">)</span>
<span class="identifier">postcondition</span><span class="special">(</span> <span class="identifier">size</span><span class="special">()</span> <span class="special">==</span> <span class="identifier">count</span> <span class="special">)</span>
@@ -512,10 +512,21 @@
<span class="special">}</span>
</pre>
<p>
- For functions other than constructors, function-try-blocks are programmed
- outside the macros and around the body definition as usual:
- </p>
-<pre class="programlisting"><span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span>
+ For functions other than constructors or constructors without member initializers,
+ function-try-blocks are programmed outside the macros and around the body
+ definition as usual:
+ </p>
+<pre class="programlisting"><span class="identifier">CONTRACT_CONSTRUCTOR</span><span class="special">(</span> <span class="comment">// Constructor without member initializers.</span>
+<span class="special">(</span><span class="identifier">vector</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">void</span> <span class="special">)</span>
+ <span class="identifier">postcondition</span><span class="special">(</span> <span class="identifier">empty</span><span class="special">()</span> <span class="special">)</span>
+<span class="special">)</span> <span class="keyword">try</span> <span class="special">{</span>
+ <span class="special">...</span>
+<span class="special">}</span> <span class="keyword">catch</span><span class="special">(...)</span> <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cerr</span> <span class="special"><<</span> <span class="string">"unknown error for "</span> <span class="special"><<</span> <span class="identifier">count</span> <span class="special"><<</span> <span class="string">" elements"</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">throw</span> <span class="identifier">vector_error</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+<span class="special">}</span>
+
+<span class="identifier">CONTRACT_FUNCTION</span><span class="special">(</span> <span class="comment">// Non-constructor function.</span>
<span class="keyword">float</span> <span class="special">(</span><span class="identifier">sqrt</span><span class="special">)</span> <span class="special">(</span> <span class="keyword">float</span> <span class="identifier">x</span> <span class="special">)</span>
<span class="identifier">precondition</span><span class="special">(</span> <span class="identifier">x</span> <span class="special">>=</span> <span class="number">0</span> <span class="special">)</span>
<span class="identifier">postcondition</span><span class="special">(</span> <span class="keyword">auto</span> <span class="identifier">result</span> <span class="special">=</span> <span class="keyword">return</span><span class="special">,</span> <span class="identifier">x</span> <span class="special">==</span> <span class="identifier">result</span> <span class="special">*</span> <span class="identifier">result</span> <span class="special">)</span>
Modified: sandbox/contract/libs/contract/doc/html2/index.html
==============================================================================
--- sandbox/contract/libs/contract/doc/html2/index.html (original)
+++ sandbox/contract/libs/contract/doc/html2/index.html 2011-09-15 11:44:07 EDT (Thu, 15 Sep 2011)
@@ -55,7 +55,7 @@
</h2></div></div></div></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: September 15, 2011 at 15:07:54 GMT</small></p></td>
+<td align="left"><p><small>Last revised: September 15, 2011 at 15:25:05 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
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