Consider the following piece of C++ code:
void foo() {
std::cout << "Hello, "
<< "world!"
<< std::endl;
}
When I run clang-format
without any style options, I get this:
void foo() {
std::cout << "Hello, "
<< "world!" << std::endl;
}
How to obtain the following result (each <<
starts on its own line)?
void foo() {
std::cout << "Hello, "
<< "world!"
<< std::endl;
}
One advice is to terminate each line with //
:
void foo() {
std::cout << "Hello, " //
<< "world!" //
<< std::endl; //
}
But is that possible to achieve such indentation by using style options only?