sp_addr
Category: Spacing options Type: multiple (ignore add remove force) Default: remove
Add or remove space after the '&' (address-of) unary operator. This does not affect the spacing after a '&' that is part of a type. Default: remove
ptr=&var
raw CPP code | sp_addr=ignore | sp_addr=add | sp_addr=remove | sp_addr=force | space sp_addr=force |
---|---|---|---|---|---|
char*p=&c; char*p=& c; cout<<&c; cout<<& c; fcall(&c); fcall(& c); // but no effect on that char&r=c; char& r=c; f(char&,int&); f(c& ,int& ); | char*p=&c; char*p=& c; cout<<&c; cout<<& c; fcall(&c); fcall(& c); // but no effect on that char&r=c; char& r=c; f(char&,int&); f(c&,int& ); | char*p=& c; char*p=& c; cout<<& c; cout<<& c; fcall(& c); fcall(& c); // but no effect on that char&r=c; char& r=c; f(char&,int&); f(c&,int& ); | char*p=&c; char*p=&c; cout<<&c; cout<<&c; fcall(&c); fcall(&c); // but no effect on that char&r=c; char& r=c; f(char&,int&); f(c&,int& ); | char*p=& c; char*p=& c; cout<<& c; cout<<& c; fcall(& c); fcall(& c); // but no effect on that char&r=c; char& r=c; f(char&,int&); f(c&,int& ); | char*p=&c; char*p=&c; cout<><<&c; cout<><<&c; fcall(&c); fcall(&c); // but no effect on that char&r=c; char&r=c; f(char&,int&); f(c&,int&); |
Take care: the default is 'remove' BUG in TRACK "cout<<&c;" ==> "cout <> <<&c;" Edited by JEAYNE
Not the best code for this option? See how to improve the .uds file used to generate these examples.