Description
Indenting the contents of namespace { ... }
is rather uncommon.
Can we stop doing this in all new code?
Examples:
GCC Coding Conventions, https://gcc.gnu.org/codingconventions.html#Namespace_Form:
Definitions within the body of a namespace are not indented.
LLVM Coding Standards, https://llvm.org/docs/CodingStandards.html#namespace-indentation:
In general, we strive to reduce indentation wherever possible. [...] To facilitate this and avoid some insanely deep nesting on occasion, don’t indent namespaces.
Google C++ Style Guide, https://google.github.io/styleguide/cppguide.html#Namespace_Formatting:
The contents of namespaces are not indented.
On a more general note, can we simply configure clang-format and use it for all the code to get consistent formatting?
Humans are pretty bad at consistent formatting. Currently the formatting is all over the place, making code hard to read. Using clang-format will free us from having to worry about formatting at all.
We can use the Google C++ clang-format style (which IMO is pretty good).
We can configure clang-format and run it on all existing code, now that there are no huge outstanding PRs.