Skip to content
56 changes: 56 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Style: Boost.Algorithm
BasedOnStyle: LLVM
Language: Cpp
AccessModifierOffset: -4
# ConstructorInitializerIndentWidth: 4
# AlignEscapedNewlinesLeft: false
# AlignTrailingComments: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterDefinitionReturnType: true # needs version 3.6.0
# AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
# BreakBeforeBinaryOperators: false
# BreakBeforeTernaryOperators: true
# BreakConstructorInitializersBeforeComma: false
# BinPackParameters: true
ColumnLimit: 80
# ConstructorInitializerAllOnOneLineOrOnePerLine: false
# DerivePointerAlignment: false
# ExperimentalAutoDetectBinPacking: false
# IndentCaseLabels: false
# IndentWrappedFunctionNames: false
# IndentFunctionDeclarationAfterType: false
# MaxEmptyLinesToKeep: 1
# KeepEmptyLinesAtTheStartOfBlocks: true
# NamespaceIndentation: None
# ObjCSpaceAfterProperty: false
# ObjCSpaceBeforeProtocolList: true
# PenaltyBreakBeforeFirstCallParameter: 19
# PenaltyBreakComment: 300
# PenaltyBreakString: 1000
# PenaltyBreakFirstLessLess: 120
# PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 0
PointerAlignment: Right
SpacesBeforeTrailingComments: 2
# Cpp11BracedListStyle: true
Standard: Cpp03
IndentWidth: 4
# TabWidth: 4
# UseTab: Never
BreakBeforeBraces: Stroustrup #GNU # Linux
SpacesInParentheses: true
SpacesInAngles: true
# SpaceInEmptyParentheses: false
# SpacesInCStyleCastParentheses: false
# SpacesInContainerLiterals: true
# SpaceBeforeAssignmentOperators: true
# ContinuationIndentWidth: 4
# CommentPragmas: '^ IWYU pragma:'
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: Always # ControlStatements
# DisableFormat: false
Loading