Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: buzz_lightzyear on February 19, 2018, 10:35:04 pm

Title: Code completion - containers
Post by: buzz_lightzyear on February 19, 2018, 10:35:04 pm
Hello!

I have a little problem: when I am creating a variable - lets say myVariable the code completion works very fine. When I am typing "myV" - the IDE shows "myVariable" immediately.

But when I am creating a container like:

Code
std::array<int, 3> myArray{1,2,3};

and I am typing "myA" nothing happens... and so when I am typing "myArray." no available functions were shown. :-(

Can someone help me to solve this problem?

Thx! :-)
Title: Re: Code completion - containers
Post by: oBFusCATed on February 19, 2018, 11:52:43 pm
Either the template or the curly brackets are confusing the parser...
Title: Re: Code completion - containers
Post by: BlueHazzard on February 20, 2018, 12:27:04 am
The current code completion plugin is not great with template code....

If you like experimenting you can try the Clang code completion:
https://github.com/yvesdm3000/ClangLib/tree/staging

But you have to compile codeblocks by yourself to be able to install this plugin.

If you want to try it i can write a instruction how to do it....
Title: Re: Code completion - containers
Post by: buzz_lightzyear on February 20, 2018, 12:29:06 pm
Hey!

This would be great! :-) I have already installed Clang also for real-time code checking but its not working so far.

Thx! :-)