Author Topic: Code Completion does not work with C++11 initialization syntax  (Read 4770 times)

Offline Navarro

  • Single posting newcomer
  • *
  • Posts: 2
Code Completion does not work with C++11 initialization syntax
« on: December 11, 2013, 08:18:29 am »
Is this a bug or am I doing something incorrectly.

For instance i have a code like this:

class Foo()
{
public: Foo(int x){}
};

if I type

Foo foo(4);

and then begin typing foo. code completion works as normal.

However if I used curly braces to initialize foo like this: Foo foo{4}

When I then type foo. there is no suggestions.

I was not able to find the answer to this questions anywhere else. Hoping someone can help me.

Mike

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code Completion does not work with C++11 initialization syntax
« Reply #1 on: December 11, 2013, 08:22:18 am »
...
Hoping someone can help me.

Mike
Hi, Mike, I think it is normally a bug or a feature request, C++ grammar is too complex and our parser in CodeCompletion plugin is hard to implement. Any way, patches are welcome to improve this.
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.