From 5a9b508279b3a221d36149aa2e811a9702b28e60 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 31 May 2017 22:21:25 +0200 Subject: [trivial] Add end of namespace comments --- doc/developer-notes.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 797507cd3e..7d3427a3b3 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -45,7 +45,7 @@ class Class return true; } } -} +} // namespace foo ``` Doxygen comments @@ -408,6 +408,21 @@ Source code organization - *Rationale*: Avoids symbol conflicts +- Terminate namespaces with a comment (`// namespace mynamespace`). The comment + should be placed on the same line as the brace closing the namespace, e.g. + +```c++ +namespace mynamespace { + ... +} // namespace mynamespace + +namespace { + ... +} // namespace +``` + + - *Rationale*: Avoids confusion about the namespace context + GUI ----- -- cgit v1.2.3