diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-09 13:55:43 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-12-09 13:55:43 +0000 |
commit | d7b08904f0b8895dc2cb1611953fd75d80c59567 (patch) | |
tree | 4c3531484636f4261793301cb08ee23d3521d7b6 /docs/ACE-guidelines.html | |
parent | 06302f6014e2379d233d844423cae3be5a60b84c (diff) | |
download | ATCD-d7b08904f0b8895dc2cb1611953fd75d80c59567.tar.gz |
strengthened mention of ACE_ASSERT danger
Diffstat (limited to 'docs/ACE-guidelines.html')
-rw-r--r-- | docs/ACE-guidelines.html | 15 |
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 < Options::instance ()->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 < Options::instance ()->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> |