---
Language:        Cpp

# BasedOnStyle:  Mozilla
AccessModifierOffset: -2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
ColumnLimit:     80

IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
KeepEmptyLinesAtTheStartOfBlocks: true
NamespaceIndentation: None
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
SpacesBeforeTrailingComments: 1
Standard:        Cpp11
IndentWidth:     2
TabWidth:        4
UseTab:          Never
SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas:  '^ IWYU pragma:'
ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat:   false


# Dont want spaces inside a cast, eg, ( char* )
SpacesInCStyleCastParentheses: false

# NEEDDS CLANGFORMAT 3.6 -> SpaceAfterCStyleCast : true


# Prefer to derive pointer alignment, and in case it cant be,
# prefer C++ style, with emphasis on the variable type.
DerivePointerAlignment: false
PointerAlignment: Left

# C++11 stuff
Cpp11BracedListStyle: true

# Indents
ConstructorInitializerIndentWidth: 2

# SpaceAfterTemplateKeyword: true
# SpaceAfterCStyleCast: true

# Allow user to have extra spacing
MaxEmptyLinesToKeep: 2

ConstructorInitializerAllOnOneLineOrOnePerLine: true

# ----- Braces -----

# line breaking
AlwaysBreakTemplateDeclarations: false
BreakConstructorInitializersBeforeComma: false

# Custom control of brace style. Needs clang-format 3.8+
BraceWrapping:
  BeforeElse: true
BreakBeforeBraces: Custom

# Argument packing

BinPackParameters: true

ExperimentalAutoDetectBinPacking: false

...
