Commit Graph

7 Commits

Author SHA1 Message Date
Russell Yanofsky cd0e1e91dd Fix inconsistent namespace formatting guidelines
Suggested formatting for namespaces in the developer guide is currently
inconsistent. This commit updates the developer guide and clang-format
configuration to consistently put "namespace" and opening/closing braces
on the same line. Example:

```c++
namespace boost {
namespace signals2 {
class connection;
} // namespace signals2
} // namespace boost
```

Currently the "Source code organization" section has an example like the one
above, but the "Coding style" section example and description put a newline
between the opening "namespace foo" and brace (but oddly no newline between
closing namespace and brace).

Avoiding newlines before namespace opening braces makes nested declarations
less verbose and also avoids asymmetry with closing braces. It's also a
common style used in other codebases:

* https://google.github.io/styleguide/cppguide.html#Namespaces
* https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Classes
* https://llvm.org/docs/CodingStandards.html#namespace-indentation
2018-04-13 15:37:20 -04:00
Wladimir J. van der Laan 6dbcc74a0e
Merge #10193: scripted-diff: Remove #include <boost/foreach.hpp>
b1268a1 clang-format: Delete ForEachMacros (Jorge Timón)
5995735 scripted-diff: Remove #include <boost/foreach.hpp> (Jorge Timón)
3eff827 scripted-diff: Remove BOOST_REVERSE_FOREACH (Jorge Timón)
33aed5b Fix const_reverse_iterator constructor (pass const ptr) (Jorge Timón)
300851e Introduce src/reverse_iterator.hpp and include it... (Jorge Timón)

Tree-SHA512: df3405328e9602d0a433ac134ba59a5c9a6202ef64188df2f94a59b2ce58dec7c988b25d0671c7937de516a96b2e6daeb9d04c82fa363b616ee4cf6e9cb0fac6
2017-07-04 18:05:18 +02:00
Jorge Timón b1268a19d0
clang-format: Delete ForEachMacros 2017-06-22 03:48:54 +02:00
practicalswift 131a8ceb73 Make clang-format use C++11 features (e.g. A<A<int>> instead of A<A<int> >) 2017-06-15 17:31:58 +02:00
MarcoFalke fa5137c11d [doc] Remove unused clang format dev script
Also, update the clang format file to reflect the current coding
style mentioned in the developer notes.
2017-01-28 16:57:08 +01:00
MarcoFalke e0eeb672f2 [trivial] clang-format: Set AlignAfterOpenBracket: false 2015-11-05 23:28:02 +01:00
Pieter Wuille 2887bffcfd Update coding style and add .clang-format 2014-07-28 22:08:13 +02:00