我的代码中有这个,
template<
typename Ptr = byte*,
typename Diff = typename std::pointer_traits<Ptr>::difference_type
>
struct block;
如何防止
clang-format
将其回流为:
template<
typename Ptr = byte*,
typename Diff = typename std::pointer_traits<Ptr>::difference_type>
struct block;
到目前为止,这是我的配置文件:
---
Language: Cpp
AlignAfterOpenBracket: BlockIndent # Align
AlwaysBreakTemplateDeclarations: No # Yes
ColumnLimit: 0
FixNamespaceComments: true
AccessModifierOffset: -99 # 2
IndentWidth: 100
PenaltyBreakTemplateDeclaration: 10
PointerAlignment: Left
SpaceAfterTemplateKeyword: false # true
TabWidth: 100
UseTab: Always # Never
...
我正在使用
clang-format 14.0.0
.