C++ 取消锈蚀:使用模板在多行typedef中的角括号后添加新行
使用Uncrustify工具,我正在寻找一个规则,如果开始和结束的角度括号不在同一行,在开始的角度括号后添加一个新行。换句话说,如果线条长了,我想在C++模板的第一个参数之前加一个新线(在我的例子中意味着140列)。p> 在函数定义/声明/调用的Uncrustify中有类似的规则 对于这个用例,Uncrustify中是否有可用的规则 输入C++ 取消锈蚀:使用模板在多行typedef中的角括号后添加新行,c++,formatting,uncrustify,C++,Formatting,Uncrustify,使用Uncrustify工具,我正在寻找一个规则,如果开始和结束的角度括号不在同一行,在开始的角度括号后添加一个新行。换句话说,如果线条长了,我想在C++模板的第一个参数之前加一个新线(在我的例子中意味着140列)。p> 在函数定义/声明/调用的Uncrustify中有类似的规则 对于这个用例,Uncrustify中是否有可用的规则 输入 typedef::foo::moon::extra::common::super::VeryLongClassNameaverylongnamefordemn
typedef::foo::moon::extra::common::super::VeryLongClassName<::foo::moon::extra::common::super::ISuperNice,::foo::moon::extra::common::super::verylastparameter>averylongnamefordemnstation;
预期产量
typedef ::foo::moon::extra::common::super::VeryLongClassName<
::foo::moon::extra::common::super::ISuperNice,
::foo::moon::extra::common::super::NiceStoryAboutTheSea,
::foo::moon::extra::common::super::TheVeryLastParameter> AVeryLongNameForDemonstration;
typedef::foo::moon::extra::common::super::VeryLongClassName<
::foo::moon::extra::common::super::ISuperNice,
::foo::moon::extra::common::super::nicestorythesea,
::foo::moon::extra::common::super::VerylasParameter>AveryLongNameforDemonstation;
否,目前没有类似的模板选项
然而,你可以打开一个功能请求,或者更好的是,在提交一个PR
typedef ::foo::moon::extra::common::super::VeryLongClassName<
::foo::moon::extra::common::super::ISuperNice,
::foo::moon::extra::common::super::NiceStoryAboutTheSea,
::foo::moon::extra::common::super::TheVeryLastParameter> AVeryLongNameForDemonstration;