1

Is there a way of getting Astyle to indent enum class elements to the same depth?

I am getting the following:

enum class test {
    test1 = 1,
            test2 = 2,
                    test3 = 3,
                            test4 = 4
                            };

whereas I want something like:

enum class test {
    test1 = 1,
    test2 = 2,
    test3 = 3,
    test4 = 4
};

Large enums are indented too far to the right.

Current options are kr style, options: S L C N.

John
  • 10,837
  • 17
  • 78
  • 141
  • Could you please remove 'class' and try format it again? If it will help, then astyle does not properly handle c++11 constructs. In such case you always can submit bug report here http://sourceforge.net/p/astyle/bugs/270/ – Sergei Nikulov Sep 10 '14 at 17:39
  • It's a bug: enum class test { test1 = 1, test2 = 2, test3 = 3, test4 = 4 }; – John Sep 11 '14 at 06:17
  • Thanks, @Sergey, for the bug link (formatting in my comment has turned out wrong, but the actual result when I removed "class" is correct): bug has been submitted. – John Sep 11 '14 at 06:26

0 Answers0