home  

sp_after_constr_colon

Properties

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

Description

Add or remove space after class constructor ':'.

Default: add
  MyClass(int A):a(A){
    b=0;
  };

Examples

raw CPP code sp_after_constr_colon=ignore sp_after_constr_colon=add sp_after_constr_colon=remove sp_after_constr_colon=force
class MyClass { MyClass(int I):i(I){ //... }; MyClass(char C) : c(C){ //... }; } class MyClass { MyClass(int I) :i(I){ //... }; MyClass(char C) : c(C){ //... }; } class MyClass { MyClass(int I) : i(I){ //... }; MyClass(char C) : c(C){ //... }; } class MyClass { MyClass(int I) :i(I){ //... }; MyClass(char C) :c(C){ //... }; } class MyClass { MyClass(int I) : i(I){ //... }; 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.