Preventing clang-format from inserting line breaks in template instantiations

Viewed 85

I'm having a problem where clang-format inserts line breaks in template instantiation parameters too easily.

For example, this:

return std::is_trivially_constructible_v<T> && std::is_trivially_destructible_v<T>;

becomes:

return std::is_trivially_constructible_v<
           T> && std::is_trivially_destructible_v<T>;

This really irks me for some reason. Is there a way to make this prefer to keep the template instantiation parameters on the same line, if possible?

For example, something like this would be great:

return std::is_trivially_constructible_v<T>
    && std::is_trivially_destructible_v<T>;
0 Answers
Related