【发布时间】:2020-06-13 17:51:04
【问题描述】:
我正在寻找一种使尾随返回类型始终放在新行上的方法。我注意到 clang 格式会使用长声明来做到这一点,但如果它足够短则不会。有办法改变吗?
例如
auto foo() -> std::optional<std::string>
{
// ...
}
变成
auto foo()
-> std::optional<std::string>
{
// ...
}
【问题讨论】:
标签: c++ clang-format