---
Language:        Cpp
BasedOnStyle:    GNU

# Put a function on a single line if possible, but only in a class (typically
# for accessors and mutators).
AllowShortFunctionsOnASingleLine: InlineOnly

# Newline after the return type of a function, but only for definitions (not
# declarations), and not for member function definitions.
AlwaysBreakAfterReturnType: TopLevelDefinitions

# Newline after `template` line.
AlwaysBreakTemplateDeclarations: Yes

# TODO: The first sentence of the GNU formatting standards is, "Please keep the
# length of source lines to 79 characters or less, for maximum readability in
# the widest range of environments."  We should therefore remove this setting
# (using 79 by default from BasedOnStyle: GNU) and also update .dir-locals.el.
# https://www.gnu.org/prep/standards/standards.html#Formatting
ColumnLimit: 80

# Indentation width in initializers.
ConstructorInitializerIndentWidth: 2

# Indentation width in expression continued on next line.
ContinuationIndentWidth: 2

# No spaces inside braced list.
Cpp11BracedListStyle: true

# Add missing end comments for namespaces and fix invalid existing ones.
FixNamespaceComments: true

# Always put each constructor initializer on its own line.
PackConstructorInitializers: Never

# Never rewrap comments.  Some of them contain ASCII art.
ReflowComments: false

# Never sort includes.  The order sometimes matters.
SortIncludes: Never

# Space after `(void)` in `(void) ...;`.  (We don't use C-style casts for
# anything but void.)
SpaceAfterCStyleCast: true

# Space in C++11 braced-list initialization:
# Foo foo {bar};
#        ^
SpaceBeforeCpp11BracedList: true

Standard: Latest
