[Next] [Prev] [Up] [Top]

14.0 Type Conversions

Avoid down casts (GL)


If the compiler supports dynamic_cast<>, always use it in preference to any other mechanism.

Although it is not always possible, avoid use of all downcasts. Downcasting is casting a pointer of a base class to a pointer to a derived class.

For Unix, always assert that the cast is valid (see "X::downCast()" below).


No Title
[Next] [Prev] [Up] [Top]

Generated with CERN WebMaker

This site was grabbed using the TRIAL version of Grab-a-Site. This message does not appear on a licensed copy of Grab-a-Site.