Author Topic: Code Completion Problem with Modern C++  (Read 486 times)

Offline kiritow

  • Single posting newcomer
  • *
  • Posts: 1
Code Completion Problem with Modern C++
« on: March 23, 2017, 06:04:11 am »
Hi, I am using Code::Blocks 16.01 on Win8.1 .
I met a problem while I was coding in C++11.
When I typed an 'auto' type, the parser couldn't understand what I was typing (I tried 're-parse', but it didn't work. ).
How to solve this problem?

Example Code:
Code: [Select]
struct ExampleStruct
{
    int a,b;
};

ExampleStruct GetExample()
{
    ExampleStruct a;
    return a;
}

void func()
{
    auto x=GetExample();
    x.a=1;    /// Here, when I typed "x.", the auto complete box didn't show up.
}

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10192
Re: Code Completion Problem with Modern C++
« Reply #1 on: March 23, 2017, 09:18:16 am »
Known problem - our parser doesn't understand most of the c++11 features.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline icequan233

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Code Completion Problem with Modern C++
« Reply #2 on: March 24, 2017, 03:09:19 pm »
As oBFusCATed said, codecompeltion can't parse the code for C++11 features, but there is another plugin named Clang CC  https://github.com/yvesdm3000/ClangLib , I think it should can compete the code of C++11, otherwise, I never use it. :)