Language:        Cpp
AccessModifierOffset: -4
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: false
AlignEscapedNewlines: Left
AlignTrailingComments:
    Kind: Always
    OverEmptyLines: 0
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BinPackParameters: true
ColumnLimit:     0
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: All
FixNamespaceComments: true
ShortNamespaceLines: 0
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: Never
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
SpacesBeforeTrailingComments: 1
SpacesInSquareBrackets: false
Cpp11BracedListStyle: true
Standard:        c++20
IndentWidth:     4
TabWidth:        4
UseTab:          Never
BreakBeforeBraces: Attach
InsertBraces: true

# NB: BraceWrapping has no effect unless BreakBeforeBraces is set to Custom
BraceWrapping:
    AfterClass: false
    AfterControlStatement: false
    AfterEnum: false
    AfterFunction: false
    AfterNamespace: false
    AfterObjCDeclaration: false
    AfterStruct: false
    AfterUnion: false
    BeforeCatch: false
    BeforeElse: false
    IndentBraces: true

SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas:  '^ IWYU pragma:'
ForEachMacros: [
    foreach,
    Q_FOREACH,
    BOOST_FOREACH,
    # Is not a foreach, but correct formatting is achieved
    Y_DEFER
]
IfMacros: [
    with_lock  # Is not an if, but correct formatting is achieved
]
SpaceBeforeParens: ControlStatements
DisableFormat:   false
SortIncludes: false
IndentPPDirectives: BeforeHash

SpaceBeforeInheritanceColon: false
NamespaceMacros: [
    Y_UNIT_TEST_SUITE
]
AttributeMacros: [
    Y_FORCE_INLINE,
    Y_HIDDEN,
    Y_NO_INLINE,
    Y_NO_SANITIZE,
    Y_PRINTF_FORMAT,
    Y_PUBLIC,
    Y_PURE_FUNCTION,
    Y_WARN_UNUSED_RESULT,
]
IndentExternBlock: Indent
TypenameMacros: [
    BENCHMARK_F,
    Y_POD_STATIC_THREAD,
    Y_POD_THREAD,
    Y_STATIC_THREAD,
    Y_THREAD,
]
StatementAttributeLikeMacros: [ythrow]
SpacesInLineCommentPrefix:
    Minimum: 1
    Maximum: 1
