Code::Blocks Forums

User forums => Help => Topic started by: LazyCoder on July 19, 2015, 07:45:17 am

Title: Code Completion Issue
Post by: LazyCoder on July 19, 2015, 07:45:17 am
Hi everyone...

Code::Blocks Nightly Build Rev.10341

CC fails in recognizing C++ enums that have an explicit type specifier.
For example:
Code
enum Colors: char { Red, Green, Blue };
or
Code
enum class Colors: char { Red, Green, Blue };
The Colors enum is NOT recognizable at all by CC!

But still, CC can recognize the following forms:
Code
enum Colors { Red, Green, Blue };
enum class Colors { Red, Green, Blue };

So, the problem seems to be with the explicit type specifiers.

Regards.
Title: Re: Code Completion Issue
Post by: ollydbg on July 21, 2015, 05:40:02 am
Thanks for reporting this bug.

I have a patch to fix this issue, but the patch is not in trunk now, see: Code::Blocks / Tickets / #176 Code completion fails with enums whose underlying types are specified (in C++11) (https://sourceforge.net/p/codeblocks/tickets/176/).