News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Code Completion Issue

Started by LazyCoder, July 19, 2015, 07:45:17 AM

Previous topic - Next topic

LazyCoder

Hi everyone...

Code::Blocks Nightly Build Rev.10341

CC fails in recognizing C++ enums that have an explicit type specifier.
For example:
enum Colors: char { Red, Green, Blue };
or
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:
enum Colors { Red, Green, Blue };
enum class Colors { Red, Green, Blue };


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

Regards.

ollydbg

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).
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.