ReSharper 2017.1 Help

C++ - Spaces

In declarations

Before ptr/ref in declaration of variable

Property names:

[resharper_]cpp_space_before_ptr_in_data_member, [resharper_]space_before_ptr_in_data_member

Possible values:

true | false

Examples:

true
int·**·data;
false
int**·data;

After ptr/ref in declaration of variable

Property names:

[resharper_]cpp_space_after_ptr_in_data_member, [resharper_]space_after_ptr_in_data_member

Possible values:

true | false

Examples:

true
int**·data;
false
int**data;

Before ptr/ref in declaration of multiple variables

Property names:

[resharper_]cpp_space_before_ptr_in_data_members, [resharper_]space_before_ptr_in_data_members

Possible values:

true | false

Examples:

true
int·**data*data2&data3·*data2;
false
int**data*data2&data3·*data2;

After ptr/ref in declaration of multiple variables

Property names:

[resharper_]cpp_space_after_ptr_in_data_members, [resharper_]space_after_ptr_in_data_members

Possible values:

true | false

Examples:

true
int·**·datadata2data3·*data2;
false
int·**data*data2&data3·*data2;

Before ptr/ref in return type of function

Property names:

[resharper_]cpp_space_before_ptr_in_method, [resharper_]space_before_ptr_in_method

Possible values:

true | false

Examples:

true
int·**·foo(int·aint·b);
false
int**·foo(int·aint·b);

After ptr/ref in return type of function

Property names:

[resharper_]cpp_space_after_ptr_in_method, [resharper_]space_after_ptr_in_method

Possible values:

true | false

Examples:

true
int**·foo(int·aint·b);
false
int**foo(int·aint·b);

After comma in declaration of multiple variables

Property names:

[resharper_]cpp_space_after_comma_in_declaration, [resharper_]cpp_space_after_comma, [resharper_]space_after_comma_in_declaration, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
int·abc;
false
int·a,b,c;

Before comma in declaration of multiple variables

Property names:

[resharper_]cpp_space_before_comma_in_declaration, [resharper_]cpp_space_before_comma, [resharper_]space_before_comma_in_declaration, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
int·c;
false
int·abc;

After comma in function parameters

Property names:

[resharper_]cpp_space_after_comma_in_method, [resharper_]cpp_space_after_comma, [resharper_]space_after_comma_in_method, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
int·foo(int·aint·bint·c);
false
int·foo(int·a,int·b,int·c);

Before comma in function parameters

Property names:

[resharper_]cpp_space_before_comma_in_method, [resharper_]cpp_space_before_comma, [resharper_]space_before_comma_in_method, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
int·foo(int·int·int·c);
false
int·foo(int·aint·bint·c);

Before parentheses in function parameters

Property names:

[resharper_]cpp_space_between_method_declaration_name_and_open_parenthesis, [resharper_]space_between_method_declaration_name_and_open_parenthesis

Possible values:

true | false

Examples:

true
int·foo·(int·aint·bint·c);
false
int·foo(int·aint·bint·c);

Within parentheses in function parameters

Property names:

[resharper_]cpp_space_between_method_declaration_parameter_list_parentheses, [resharper_]space_between_method_declaration_parameter_list_parentheses

Possible values:

true | false

Examples:

true
int·fooint·aint·bint·);
false
int·foo(int·aint·bint·c);

Within empty parentheses in function parameters

Property names:

[resharper_]cpp_space_between_method_declaration_empty_parameter_list_parentheses, [resharper_]space_between_method_declaration_empty_parameter_list_parentheses

Possible values:

true | false

Examples:

true
int·foo);
false
int·foo();

Before angle brackets in template parameters

Property names:

[resharper_]cpp_space_before_template_params, [resharper_]space_before_template_params

Possible values:

true | false

Examples:

true
template·<typename·Ktypename·V> struct·map { };
false
template<typename·Ktypename·V> struct·map { };

Within angle brackets in template parameters

Property names:

[resharper_]cpp_space_within_template_params, [resharper_]space_within_template_params

Possible values:

true | false

Examples:

true
template·typename·Ktypename·> struct·map { };
false
template·<typename·Ktypename·V> struct·map { };

Within empty angle brackets in template parameters

Property names:

[resharper_]cpp_space_within_empty_template_params, [resharper_]space_within_empty_template_params

Possible values:

true | false

Examples:

true
template·> struct·vector<bool> { };
false
template·<> struct·vector<bool> { };

After comma in template parameters

Property names:

[resharper_]cpp_space_after_comma_in_template_params, [resharper_]cpp_space_after_comma, [resharper_]space_after_comma_in_template_params, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
template·<typename·Ktypename·V> struct·map { };
false
template·<typename·K,typename·V> struct·map { };

Before comma in template parameters

Property names:

[resharper_]cpp_space_before_comma_in_template_params, [resharper_]cpp_space_before_comma, [resharper_]space_before_comma_in_template_params, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
template·<typename·typename·V> struct·map { };
false
template·<typename·Ktypename·V> struct·map { };

Before angle brackets in template arguments

Property names:

[resharper_]cpp_space_before_template_args, [resharper_]space_before_template_args

Possible values:

true | false

Examples:

true
map·<intintfoo();
false
map<intintfoo();

Within angle brackets in template arguments

Property names:

[resharper_]cpp_space_within_template_args, [resharper_]space_within_template_args

Possible values:

true | false

Examples:

true
mapintint·foo();
false
map<intintfoo();

After comma in template arguments

Property names:

[resharper_]cpp_space_after_comma_in_template_args, [resharper_]cpp_space_after_comma, [resharper_]space_after_comma_in_template_args, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
map<intintfoo();
false
map<int,intfoo();

Before comma in template arguments

Property names:

[resharper_]cpp_space_before_comma_in_template_args, [resharper_]cpp_space_before_comma, [resharper_]space_before_comma_in_template_args, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
map<int·intfoo();
false
map<intintfoo();

Between closing angle brackets in template arguments

Property names:

[resharper_]cpp_space_between_closing_angle_brackets_in_template_args, [resharper_]space_between_closing_angle_brackets_in_template_args

Possible values:

true | false

Examples:

true
vector<vector<intv;
false
vector<vector<int>>·v;

Around '=' in alias declaration and namespace alias

Property names:

[resharper_]cpp_space_around_alias_eq, [resharper_]space_around_alias_eq

Possible values:

true | false

Examples:

true
namespace·mpl·boost::mpl; using·vec·std::vector;
false
namespace·mpl=boost::mpl; using·vec=std::vector;

Around '->' in trailing return types

Property names:

[resharper_]cpp_space_around_deref_in_trailing_return_type, [resharper_]space_around_deref_in_trailing_return_type

Possible values:

true | false

Examples:

true
auto·foo()·->·int;
false
auto·foo()->int;

In control statements

Before parentheses

Property names:

[resharper_]cpp_space_after_keywords_in_control_flow_statements, [resharper_]space_after_keywords_in_control_flow_statements

Possible values:

true | false

Examples:

true
while·(true) { }
false
while(true) { }

Within parentheses

Property names:

[resharper_]cpp_space_between_parentheses_of_control_flow_statements, [resharper_]space_between_parentheses_of_control_flow_statements

Possible values:

true | false

Examples:

true
do { } while·true·)
false
do { } while·(true)

Before semicolon in for statement

Property names:

[resharper_]cpp_space_before_semicolon_in_for_statement, [resharper_]space_before_semicolon_in_for_statement

Possible values:

true | false

Examples:

true
for·(int·10·i++) { }
false
for·(int·110i++) { }

After semicolon in for statement

Property names:

[resharper_]cpp_space_after_semicolon_in_for_statement, [resharper_]space_after_semicolon_in_for_statement

Possible values:

true | false

Examples:

true
for·(int·110i++) { }
false
for·(int·1;10;i++) { }

Before colon in switch case or label statement

Property names:

[resharper_]cpp_space_before_colon_in_case, [resharper_]space_before_colon_in_case

Possible values:

true | false

Examples:

true
switch·(acase·break}
false
switch·(acase·bbreak}

After colon in switch case or label statement

Property names:

[resharper_]cpp_space_after_colon_in_case, [resharper_]space_after_colon_in_case

Possible values:

true | false

Examples:

true
switch·(acase·bbreak}
false
switch·(acase·b:break}

In expressions

Around binary operator

Property names:

[resharper_]cpp_space_around_binary_operator, [resharper_]space_around_binary_operator

Possible values:

true | false

Examples:

true
b
false
a+b

Around assignment operator

Property names:

[resharper_]cpp_space_around_assignment_operator, [resharper_]space_around_assignment_operator

Possible values:

true | false

Examples:

true
b;
false
a=b;

Around dot and '->'

Property names:

[resharper_]cpp_space_around_dot, [resharper_]cpp_space_around_member_access_operator, [resharper_]space_around_dot, [resharper_]space_around_member_access_operator

Possible values:

true | false

Examples:

true
obj·->·method()
false
obj->method()

Within parentheses

Property names:

[resharper_]cpp_space_within_parentheses, [resharper_]space_within_parentheses

Possible values:

true | false

Examples:

true
)->method();
false
(b)->method();

Before array subscript brackets

Property names:

[resharper_]cpp_space_before_open_square_brackets, [resharper_]space_before_open_square_brackets

Possible values:

true | false

Examples:

true
[i]
false
a[i]

Within array subscript brackets

Property names:

[resharper_]cpp_space_within_array_access_brackets, [resharper_]cpp_space_between_square_brackets, [resharper_]space_within_array_access_brackets, [resharper_]space_between_square_brackets

Possible values:

true | false

Examples:

true
a]
false
a[i]

Before parentheses in function call and initialization

Property names:

[resharper_]cpp_space_before_method_call_parentheses, [resharper_]cpp_space_between_method_call_name_and_opening_parenthesis, [resharper_]space_before_method_call_parentheses, [resharper_]space_between_method_call_name_and_opening_parenthesis

Possible values:

true | false

Examples:

true
foo·(abc);
false
foo(abc);

Before empty parentheses in function call and initialization

Property names:

[resharper_]cpp_space_before_empty_method_call_parentheses, [resharper_]cpp_space_between_method_call_name_and_opening_parenthesis, [resharper_]space_before_empty_method_call_parentheses, [resharper_]space_between_method_call_name_and_opening_parenthesis

Possible values:

true | false

Examples:

true
foo·();
false
foo();

Within parentheses in cast expressions

Property names:

[resharper_]cpp_space_between_typecast_parentheses, [resharper_]space_between_typecast_parentheses

Possible values:

true | false

Examples:

true
int·)0.5;
false
(int)0.5;

After parentheses in cast expressions

Property names:

[resharper_]cpp_space_after_cast, [resharper_]space_after_cast

Possible values:

true | false

Examples:

true
(int0.5;
false
(int)0.5;

Within parentheses in function call and initialization

Property names:

[resharper_]cpp_space_between_method_call_parameter_list_parentheses, [resharper_]space_between_method_call_parameter_list_parentheses

Possible values:

true | false

Examples:

true
fooab);
false
foo(abc);

Within empty parentheses in function call and initialization

Property names:

[resharper_]cpp_space_between_method_call_empty_parameter_list_parentheses, [resharper_]space_between_method_call_empty_parameter_list_parentheses

Possible values:

true | false

Examples:

true
foo);
false
foo();

Before comma in function call and initialization

Property names:

[resharper_]cpp_space_before_comma_in_method_call, [resharper_]cpp_space_before_comma, [resharper_]space_before_comma_in_method_call, [resharper_]space_before_comma

Possible values:

true | false

Examples:

true
foo(c);
false
foo(abc);

After comma in function call and initialization

Property names:

[resharper_]cpp_space_after_comma_in_method_call, [resharper_]cpp_space_after_comma, [resharper_]space_after_comma_in_method_call, [resharper_]space_after_comma

Possible values:

true | false

Examples:

true
foo(abc);
false
foo(a,b,c);

In ternary operator '? :' before '?'

Property names:

[resharper_]cpp_space_before_ternary_quest, [resharper_]space_before_ternary_quest

Possible values:

true | false

Examples:

true
c
false
ac

In ternary operator '? :' after '?'

Property names:

[resharper_]cpp_space_after_ternary_quest, [resharper_]space_after_ternary_quest

Possible values:

true | false

Examples:

true
c
false
?c

In ternary operator '? :' before ':'

Property names:

[resharper_]cpp_space_before_ternary_colon, [resharper_]space_before_ternary_colon

Possible values:

true | false

Examples:

true
c
false
bc

In ternary operator '? :' after ':'

Property names:

[resharper_]cpp_space_after_ternary_colon, [resharper_]space_after_ternary_colon

Possible values:

true | false

Examples:

true
c
false
:c

Before uniform initialization braces

Property names:

[resharper_]cpp_space_before_initializer_braces, [resharper_]space_before_initializer_braces

Possible values:

true | false

Examples:

true
auto·complex·{3,4};
false
auto·complex{3,4};

Within uniform initialization braces

Property names:

[resharper_]cpp_space_within_initializer_braces, [resharper_]space_within_initializer_braces

Possible values:

true | false

Examples:

true
auto·complex3,};
false
auto·complex{3,4};

Within empty uniform initialization braces

Property names:

[resharper_]cpp_space_within_empty_initializer_braces, [resharper_]space_within_empty_initializer_braces

Possible values:

true | false

Examples:

true
auto·int};
false
auto·int{};
Last modified: 12 October 2017