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
commit75050d1c1357be5a6b139d9ee6443d5332d59952 (patch)
tree24960adde16b91d14d36402256617d1645968d26 /etc
parentb8dc0f0002c103e7e5cf4d83ba54aac5464b1f58 (diff)
downloadATCD-75050d1c1357be5a6b139d9ee6443d5332d59952.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: