-
Notifications
You must be signed in to change notification settings - Fork 781
Open
Description
Several details of code formatting are inconsistent at the moment.
The first step should be to document the desired style on the wiki; then we can clean up the main text by applying the documented style.
Here are some items I noticed repeatedly:
template <class T, class U = T> struct Foo<T, U>
- space between
template <
- no space in template specializations,
Foo<T, U>
- space around
=
inU = T
- space between
- f(a, b , c)
- space after comma, not before
- no space before the leading parenthesis in function call expressions
- Generally, spaces around binary operators except for comma.
- Space before leading parenthesis in control structures (
for
,while
,if
). - No spaces between closing template brackets:
Foo<Bar<T>>
. I think there's a separate issue open for this already, but it should go into the style guide in any case.
I think many of those rules are fairly easy to check globally with grep
, and so the cleanup shouldn't be terribly difficult or protracted.
Metadata
Metadata
Assignees
Labels
No labels