Author Topic: autocompletion for C++11 new features  (Read 3938 times)

Offline koala01

  • Single posting newcomer
  • *
  • Posts: 7
autocompletion for C++11 new features
« on: March 06, 2013, 12:43:43 pm »
Hello,

I don't know if such think have alllready been discussed, but C++ offers some new features which may change autocompletion.

I think eg to the new use of using which tend to make typedef obsolete:

To make a type alias in C++03, you have to write something like
Code
typedef /*<const | volatile>*/ OrignalType /* <template information> <& | *> */ TypeAlias;

but with C++11  it is recommanded to write something like
Code
using TypeAlias  = /* <const | volatile>*/ OriginalType  /* <template information> <& |*> */ ;
It should be great if the second syntax was recognised by auto completion like a typedef.

Is such recognition planed for development ?

Offline hdastwb

  • Single posting newcomer
  • *
  • Posts: 2
Re: autocompletion for C++11 new features
« Reply #1 on: June 26, 2013, 03:24:00 am »
Can I bump this thread? it never got a reply and (as of svn9162) some these expressions still aren't implemented in code completion.

Specifically, the ones that I think are the most important are:
  • Brace/Uniform Initializers (the recommended way of initializing variables): type var{value};
  • Type Aliases (the recommended way of renaming types): using type = type;
  • Enum Classes (the recommended way of using enumerations): enum class name [: type] {...};

Until these are implemented, they provide an active reinforcement to outdated C++ programming practice. I've tried figuring out how to add these to ParserThread, but I think it would be better if someone else who knows what they are doing takes care of it…

However, I see that ranged-for does work correctly; keep it up!