clang-format 14: Unexpected empty line after `requires` declarations

Viewed 16

I use clang-format to format my code. I would like to have a class declaration like this:

template <class C>
requires Foo<C>
class Baz {
  // ...
};

But when i hit format, clang-format has format my file with an "extra" empty line after requires declaration and before class:

template <class C>
requires Foo<C>
                          // <- what is this??
class Baz {
  // ...
};

I have not found anything that mentions "empty line before requires declarations" in the clang-format docs. I have tried to use MaxEmptyLinesToKeep: 0 in my .clang-format but actually it's very bad option with me. How can i fix it?

0 Answers
Related