Skip to content
Snippets Groups Projects
Commit e73f43c7 authored by hjk's avatar hjk
Browse files

coding-style: mention virtual inheritance

parent b9cae782
No related branches found
No related tags found
No related merge requests found
...@@ -537,9 +537,13 @@ ...@@ -537,9 +537,13 @@
\list \list
\o Do not use exceptions, unless you know what you do. \o Do not use exceptions, unless you know what you do.
\o Do not use RTTI (Run-Time Type Information; that is, the typeinfo \o Do not use RTTI (Run-Time Type Information; that is, the typeinfo
struct, the dynamic_cast or the typeid operators, including throwing struct, the dynamic_cast or the typeid operators, including throwing
exceptions), unless you know what you do. exceptions), unless you know what you do.
\o Do not use virtual inheritance, unless you know what you do.
\o Use templates wisely, not just because you can. \o Use templates wisely, not just because you can.
Hint: Use the compile autotest to see whether a C++ feature is supported Hint: Use the compile autotest to see whether a C++ feature is supported
...@@ -559,12 +563,13 @@ ...@@ -559,12 +563,13 @@
either use the qdoc \c {\unicode} command or use the relevant macro. either use the qdoc \c {\unicode} command or use the relevant macro.
For example: \c{\uuml} for \uuml. For example: \c{\uuml} for \uuml.
\endlist \endlist
\o Use static keywords instead of anonymous namespaces whenever possible. \o Use static keywords instead of anonymous namespaces whenever possible.
A name localized to the compilation unit with static is A name localized to the compilation unit with static is
guaranteed to have internal linkage. For names declared in anonymous guaranteed to have internal linkage. For names declared in anonymous
namespaces, the C++ standard unfortunately mandates external linkage namespaces, the C++ standard unfortunately mandates external linkage
(ISO/IEC 14882, 7.1.1/6, or see various discussions about this on the gcc mailing (ISO/IEC 14882, 7.1.1/6, or see various discussions about this on the gcc
lists). mailing lists).
\endlist \endlist
\section3 Null Pointers \section3 Null Pointers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment