diff options
-rw-r--r-- | etc/ACE-guidelines.html | 7 |
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->count_) > that->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: |