home  

sp_before_constr_colon

Properties

  Category: Spacing options
      Type: multiple (ignore add remove force)
   Default: add

Description

Add or remove space before class constructor ':'.

Default: add
MyClass::MyClass(int I):i(I){
    //...
};

Examples

raw CPP code sp_before_constr_colon=ignore sp_before_constr_colon=add sp_before_constr_colon=remove sp_before_constr_colon=force
MyClass::MyClass(int I):i(I){ //... }; MyClass::MyClass(char C) : c(C){ //... }; MyClass::MyClass(int I): i(I){ //... }; MyClass::MyClass(char C) : c(C){ //... }; MyClass::MyClass(int I) : i(I){ //... }; MyClass::MyClass(char C) : c(C){ //... }; MyClass::MyClass(int I): i(I){ //... }; MyClass::MyClass(char C): c(C){ //... }; MyClass::MyClass(int I) : i(I){ //... }; MyClass::MyClass(char C) : c(C){ //... };
 

Info

  Take care: the default is 'add' for both sp_before_constr_colon and sp_after_constr_colon
  Edited by JEAYNE

Not the best code for this option? See how to improve the .uds file used to generate these examples.