BasedOnStyle: Google
IndentWidth: 4
TabWidth: 4
AlwaysBreakTemplateDeclarations: true
AllowShortFunctionsOnASingleLine: Inline
BreakBeforeBraces: Linux
IndentCaseLabels: true
AccessModifierOffset: -4
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
BreakConstructorInitializersBeforeComma: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BinPackParameters: false
BinPackArguments: false
ReflowComments: false
Language: Cpp
ColumnLimit: 120
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
- Q_localarea
Standard: Cpp11
AlignTrailingComments: true
PointerAlignment: Right
MaxEmptyLinesToKeep: 1
FixNamespaceComments: true
AlignConsecutiveDeclarations: true
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignEscapedNewlinesLeft: true
AllowAllParametersOfDeclarationOnNextLine: true
clang-format
最新推荐文章于 2025-10-28 09:51:37 发布
本文详细介绍了 C++ 的编码规范,包括基于 Google 风格的代码格式设置选项,如缩进宽度、模板声明的换行规则、注释的重新排版等。此外还涉及了函数、类、命名空间等元素的布局方式。
3655

被折叠的 条评论
为什么被折叠?



