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

8.0 Functions

Avoid overloading functions or methods based upon "minor" promotions (GL)


Overloading functions where the difference in type signatures is "minor" is discouraged. While the compiler will warn of ambiguities, this is likely to confuse maintenance programmers.

Bad example:

void foo (int);

void foo (short);

void foo (unsigned);

Good example:

void foo (int);

void foo (char*);

void foo (const TMyClass&);


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.