When i write a classes constructor typing :
to start the initialization list of a C++ constructor Visual Studio indents the line when it is right after a namespace
directive. Also when i type ::
(scope resolution) Visual Studio indents the line, which i found very annoying since the indentation was correct in the first place and i always have to undo Visual Studio's indentation.
Example:
This is what i haved typed:
namespace XY {
MyClass::MyClass()
now i type <space>:
, and VS indents:
namespace XY {
MyClass::MyClass() :
which is not what i, uh, intended.
This behaviour is - strictly speaking - correct, according to the rules of the "Smart Indenting" option of MSVC. But in this context it is not what I want.
Is there a way to turn off smart indenting in this context? I suppose that it is a quite common style not to indent namespace blocks.