Commit cd0673f7 authored by hjk's avatar hjk Committed by Leena Miettinen

codingstyle: add namespace rules

Change-Id: Ib6b3e37376084e2305143e42c85d13ce66ec9f2b
Reviewed-by: default avatarEike Ziller <>
Reviewed-by: default avatarLeena Miettinen <>
parent 213e2005
......@@ -492,6 +492,29 @@
important when initialization is done at the same time.
\section2 Namespaces
\o Put the left curly brace on the same line as the \namespace keyword.
\o Do not indent declarations or definitions inside.
\o Optional, but recommended if the namespaces spans more than a few lines:
Add a comment after the right curly brace repeating the namespace.
namespace MyPlugin {
void someFunction() { ... }
} // namespace MyPlugin
\o As an exception, if there is only a single class declaration inside
the namespace, all can go on a single line:
namespace MyPlugin { class MyClass; }
\section1 Patterns and Practices
\section2 Namespacing
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment