Braces layout for type declarations

EditorConfig key: cpp-type-declaration-braces

Braces layout for type declarations

cpp-type-declaration-braces

Placement of the opening brace for class, struct, union, and enum declarations.

Default value:

unset

Possible values:

  • unset
  • end_of_line
  • end_of_line_no_space
  • next_line
  • next_line_shifted
  • next_line_shifted_2

Examples

unset
end_of_line
class Foo {
  int x;
}
end_of_line_no_space
class Foo{
  int x;
}
next_line
class Foo
{
  int x;
}
next_line_shifted
class Foo
  {
  int x;
  }
next_line_shifted_2
class Foo
  {
    int x;
  }