Cpp Coding Standards/FIMPL/DefSwitch

From Apache OpenOffice Wiki
< Cpp Coding Standards‎ | FIMPL
Revision as of 12:27, 26 April 2007 by Np (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Special Cases

In case of switch on an enum, where all enum values are "case"s, it is better to not provide a default switch, because some compilers throw a warning, if one enum value is missing, but does not throw this warning, if a default branch is provided.

In such cases prefer a comment that no default is needed.

Personal tools