Indentation for initializer list in Constructor is wrong

869 views Asked by At

I'm using emacs 24.3 and I've encountered the following problem with emacs indentation engine and the new C++11 initializer lists. Let me give you an example: Consider a class Class which has a member of type std::vector<int> named m_vector. Emacs indents the constructor as follows:

Class() : m_vector( { 1,
            2,
            3 } ){ }

whereas I would expect this syntax:

Class() : m_vector( { 1,
                      2,
                      3 } ){ }

Is there a simple fix for this?

1

There are 1 answers

0
Quuxplusone On

So file a bug.

The bug tracker for GNU Emacs is here: http://debbugs.gnu.org/Emacs.html