【问题标题】:clang-format: How to prevent space before {}?clang-format:如何防止 {} 之前出现空格?
【发布时间】:2020-08-26 08:28:45
【问题描述】:

我想让auto foo = Foo {}; 变成auto foo = Foo{};

什么是正确的属性?

我的样式在从 CLI 应用时有效,但这是 Qt Creator 在我保存编辑的文件时破坏的唯一内容。

【问题讨论】:

  • 你能用你尝试过的一些不起作用的属性来更新你的问题吗?

标签: c++11 clang-format


【解决方案1】:

这个属性好像是SpaceBeforeCpp11BracedList: true,可惜clang-format-6.0不支持,我还是要用。

【讨论】:

    猜你喜欢
    • 2016-01-03
    • 1970-01-01
    • 1970-01-01
    • 2020-12-27
    • 1970-01-01
    • 2011-05-23
    • 2012-05-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多