summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-29 14:53:58 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-06-29 14:53:58 +0000
commitc98e50ac4030bf25f2808a5f0175b56e2289eccb (patch)
tree24960adde16b91d14d36402256617d1645968d26 /etc
parent1b0729ca6c3459848564a69d00dd8390a824eb72 (diff)
downloadATCD-c98e50ac4030bf25f2808a5f0175b56e2289eccb.tar.gz
clarified function casts
Diffstat (limited to 'etc')
-rw-r--r--etc/ACE-guidelines.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/ACE-guidelines.html b/etc/ACE-guidelines.html
index 784951d1107..8c8a4d05b7d 100644
--- a/etc/ACE-guidelines.html
+++ b/etc/ACE-guidelines.html
@@ -305,14 +305,17 @@ to Graham for providing the OSE tools!
}
</pre><p>
- <li>If a cast is necessary, avoid use of ANSI-style casts,
+ <li>If a cast is necessary, avoid use of function-style casts,
<em>e.g.</em>, <code>int (foo)</code>. Instead, use
- the ACE_static_cast macro:
+ one of the ACE cast macros:
<pre>
return ACE_static_cast(size_t, this-&gt;count_) &gt; that-&gt;size_;
</pre><p>
+ Not the with ANSI casts, reinterpret_cast can not be used
+ to cast away constness. That must be done with const_cast.<p>
+
<li>In general, if instances of a class should not be copied,
then a private copy constructor and assignment operator should
be declared for the class, but not implemented. For example: