Indentation of "public" and "private" visibility modifiers
If you want to follow a Style Guide, I suggest the Google C++ Style Guide:
Sections in public, protected and private order, each indented one space.
"Religious" question :-) You will get many different answers I think.
I say:
Which ever you like as long as you are consistent.
Visual Studio does this:
class Foo()
{
private:
void Bar1() {}
public:
void Bar2() {}
}
But I hate it. Many people use it though. If only C++ supported field/method specific visibility modifiers like most languages out there.
I personally like to use this:
class Foo()
{
private:
void Bar1() {}
public:
void Bar2() {}
}
VS usually keeps reverting it to its indentation scheme, so I often just submit.