summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-09 13:55:43 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-12-09 13:55:43 +0000
commit42cb690785aed0c5f9048279741fce68f971da5e (patch)
tree4c3531484636f4261793301cb08ee23d3521d7b6
parentced51f9f43d1e5910770bc0be387560090aba6cd (diff)
downloadATCD-42cb690785aed0c5f9048279741fce68f971da5e.tar.gz
strengthened mention of ACE_ASSERT danger
-rw-r--r--docs/ACE-guidelines.html15
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/ACE-guidelines.html b/docs/ACE-guidelines.html
index 2037e86dbec..5239bd57c83 100644
--- a/docs/ACE-guidelines.html
+++ b/docs/ACE-guidelines.html
@@ -207,14 +207,14 @@ bgcolor="#ffffff">
for (size_t i = 0; i &lt; Options::instance ()-&gt;spawn_count (); ++i)
spawn ();
</pre>
- (though I prefer to always wrap the body of the loop in braces,
- to avoid surprises when other code or debugging statements are
- added, and to maintain sanity when the body consists of a macro,
- such as ACE_ASSERT:)
+ Though, I prefer to always wrap the body of the loop in braces,
+ to avoid surprises when other code or debugging statements are
+ added, and to maintain sanity when the body consists of a macro,
+ such as an ACE_ASSERT without a trailing semicolon:
<pre>
for (size_t i = 0; i &lt; Options::instance ()-&gt;spawn_count (); ++i)
{
- ACE_ASSERT (spawn () == 0);
+ ACE_ASSERT (spawn () == 0;)
}
</pre><p>
@@ -707,6 +707,11 @@ bgcolor="#ffffff">
<li>Avoid using the C++ Standard Template Library (STL) in our
applications. Some platforms do not support it yet.<p>
+
+ <li>Be <em>very</em> careful with <code>ACE_ASSERT</code>. It
+ must only be used to check values; it may never be used to
+ wrap a function call, or any other statement. That's because
+ the statement will disappear when ACE_NDEBUG is enabled.<p>
</ul>