C++ - Line breaks and Wrapping
- Place on new Line
- Place "else" on new line after compound statement
- Place "while" on new line after compound statement
- Place "catch" on new line after compound statement
- Place enumerators on new line
- Break line in single embedded statement
- Break line in simple "case" statement
- Break line after function definition return type
- Break line after function declaration return type
- Break line before member initializer list
Place on new Line
Place "else" on new line after compound statement
Property names:
[resharper_]cpp_new_line_before_else
, [resharper_]new_line_before_else
Possible values:
true | false
Examples:
Place "while" on new line after compound statement
Property names:
[resharper_]cpp_new_line_before_while
, [resharper_]new_line_before_while
Possible values:
true | false
Examples:
Place "catch" on new line after compound statement
Property names:
[resharper_]cpp_new_line_before_catch
, [resharper_]new_line_before_catch
Possible values:
true | false
Examples:
Place enumerators on new line
Property names:
[resharper_]cpp_new_line_before_enumerators
, [resharper_]new_line_before_enumerators
Possible values:
true | false
Examples:
Break line in single embedded statement
Property names:
[resharper_]cpp_simple_embedded_statement_style
, [resharper_]simple_embedded_statement_style
Possible values:
Examples:
line_break |
if·(true)
··foo();
else
··foo(); |
on_single_line |
if·(true)·foo();
else·foo(); |
do_not_change |
if·(true)·foo();
else
··foo(); |
Break line in simple "case" statement
Property names:
[resharper_]cpp_simple_case_statement_style
, [resharper_]simple_case_statement_style
Possible values:
Examples:
line_break |
switch·(a)
{
case·b:
··break;
case·c:
··break;
} |
on_single_line |
switch·(a)
{
case·b:·break;
case·c:·break;
} |
do_not_change |
switch·(a)
{
case·b:·break;
case·c:
··break;
} |
Break line after function definition return type
Property names:
[resharper_]cpp_function_definition_return_type_style
, [resharper_]function_definition_return_type_style
Possible values:
Examples:
line_break |
int*
foo()·{·return·0;·}
char*
bar()·{·return·0;·} |
on_single_line |
int*·foo()·{·return·0;·}
char*·bar()·{·return·0;·} |
do_not_change |
int*·foo()·{·return·0;·}
char*
bar()·{·return·0;·} |
Break line after function declaration return type
Property names:
[resharper_]cpp_function_declaration_return_type_style
, [resharper_]function_declaration_return_type_style
Possible values:
Examples:
line_break |
struct·Boo
{
··int*
··foo();
··char*
··bar();
}; |
on_single_line |
struct·Boo
{
··int*·foo();
··char*·bar();
}; |
do_not_change |
struct·Boo
{
··int*·foo();
··char*
··bar();
}; |
Break line before member initializer list
Property names:
[resharper_]cpp_member_initializer_list_style
, [resharper_]member_initializer_list_style