Reputation: 33678
I want to format my C++ casting operators this way:
Class * foo = static_cast< Class * >( bar );
Visual Studio insists on removing the spaces within the angle brackets:
Class * foo = static_cast<Class*>( bar );
How do I prevent it from doing so?
Upvotes: 3
Views: 1399
Reputation: 33678
Go to Options > Text Editor > C/C++ > Formatting > Spacing, and check the (wrongly named) Insert space within parentheses of a C-style cast box. For some reason, it also applies to the angle brackets of C++ casting operators.
Upvotes: 5