| Version 1.9 Build 1556
|
|
Next: Portability
Up: Programming Tips
Previous: Classes
Type Conversions
Explicit type conversions ("cast"s) are to be avoided except in the
following cases:
- Conversion of a pointer to a base class to a pointer of a derived
class within a type-safe container class
- Conversion of an external data representation (bit-stream, packed
message, etc.) into an object. (Where possible use, RTTI and/or
previously defined I/O methods).
"cast"s for reasons other than those mentioned should be clearly
commented.
Avoid dependence on implicit type conversions - those that are
performed on function arguments by the compiler.
Next: Portability
Up: Programming Tips
Previous: Classes
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15