Code Formatting - Force Line Break After Colon Character In Constructor Initialization List

Is it possible for Reformat to force a line break after the colon character in the constructor initializer list?

I can't see an option for it.

Desired format:

Foo(int a, int b, int c)
   :
   m_a(a),
   m_b(b),
   m_c(c)
{
}

 

My best attempt:

Foo(int a, int b, int c)
   : m_a(a),
   m_b(b),
   m_c(c)
{
}

 

I'm using ReSharper C++ 2017.2.2.

Many thanks,
M

1 comment

Hello,

Not possible at the moment, R++ only has an option to control linebreaks before the colon. I've created a feature request - https://youtrack.jetbrains.com/issue/RSCPP-20322. Please note that if you insert a line break manually, R++ will not remove it.

Thanks!

1

Please sign in to leave a comment.