kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #39904
Formatting: break after templates
Hi,
Quick question about formatting: clang-format says
"AlwaysBreakTemplateDeclarations: false", which can produce things
like this:
template <typename FOO> void function( int aParam )
template <> struct STRUCT_TYPE<TYPE>
I think it's clearer if the template declaration is always broken
after ("AlwaysBreakTemplateDeclarations: true"):
template <typename FOO>
void function( int aParam )
template <> struct STRUCT_TYPE<TYPE>
This keeps the function signature in the "normal" format (i.e. return
type on the left), and puts the "struct" or "class", etc, in the
"normal" place too.
There aren't that many cases of either, but newline cases win by count
(77 to 10). the Uncrustify.cfg file agrees with newline:
nl_template_class = force # line 1076
The style guide has no mention of it.
Cheers,
John
Follow ups