Code formatting options - indent past privacy in classes and remove // before file header

First one:

The only options for C++ class indenting are these:

class MyClass    / class MyClass
{ / {
public: / public:
MyClass() / MyClass()
: x(0) {} / : x(0) {}
private: / private:
int x; / int x;
}; / };

However, I much prefer indenting a second time for extra readability:

class MyClass
: x(0) {}

int x;

I couldn't find any option that would let me do that.

Second one:

The file header I generally use looks like this:

\file $FILENAME$
\author $USER_NAME$

\par Copyright (C) $CREATED_YEAR$

However, resharper adds more slashes, which are not needed:

// /*!*****************************************************************************
// \file $FILENAME$
// \author $USER_NAME$
// \brief
// [brief]
// \par Copyright (C) $CREATED_YEAR$
// *******************************************************************************/

Again, I couldn't find an option to remove these.

I attempted to search through the community and google for recommendations, and I found for the file header issue but I'm not using StyleCop and the issue wasn't similar. I was using CodeMaid, and this issue still occurred after disabling that.

Apologies if this topic was already brought up :) and thanks for reading.

1 comment
Comment actions Permalink


Thanks a lot for your feedback!

Re indenting - R++ does not support this style at the moment (neither does clang-format as far as I can tell), I've filed a feature request -

Re file header - unfortunately ReSharper always prepends line comment slashes to each line of the file header text ( As a workaround, you can create your own file template which starts with your preferred header text, see

Please vote for corresponding issues to help us prioritize them and receive an update when they get fixed.


Please sign in to leave a comment.