Skip to content

ClangFormat: no way to prevent alignment of streaming operators/operator<< #147178

Open
@mitchcurtis

Description

@mitchcurtis

As described in https://stackoverflow.com/questions/38699555/clang-format-stream-output, there's no way to have e.g. 4 spaces of indentation to align streaming operators:

std::cout << 1 << 1 << 1 << 1 << 1 << 1 <<
    1 << 1 << 1 << 1 << 1 << 1;

because it always gets aligned to the previous line:

std::cout << 1 << 1 << 1 << 1 << 1 << 1
          << 1 << 1 << 1 << 1 << 1 << 1;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions