Artistic Style Version 2.05.1
Example input (astyle --style=attach test.cpp):
class TestClass : public ParentClass { protected: enum class Registers : uint16_t; public: void testFunction(); }
Expected output: no change
Actual output:
class TestClass : public ParentClass { protected: enum class Registers : uint16_t; public: void testFunction(); }
The problem appears to be associated with expecting braces, as placing braces after the enum seems to "fix" it:
class TestClass : public ParentClass { protected: enum class Registers : uint16_t; {} public: void testFunction(); }
I'm not sure if this is possible to change now, the title should be better changed into "C++ enum class forward-declaration breaks following indentation"
The same thing happens with "normal" enums, example:
output:
Fixed.
Awesome, thank you so much!