SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2015 v20 Beta Discussion => Topic started by: blingbiskit on October 06, 2015, 02:28:44 pm

Title: C++ auto keyword and autocomplete
Post by: blingbiskit on October 06, 2015, 02:28:44 pm
Hello,

I don't know if this is supposed to work or not. It is a feature I was hoping for with improved C++11 support in Slickedit. Basically, if a type is declared as 'auto', SlickEdit autocomplete doesn't work.

examples:

#include <vector>

typedef struct
{
    int a;
    int b;
}dmy_s;


void main(void)
{
     dmy_s ss;
     auto xx = ss;
     xx.  // <- No autocomplete here

     // Next test- this would be awesome if this worked
     std::vector<dmy_s> vdmy;

     for (const auto& ele : dmy_s)
     {
          ele.   // <- no autocomplete here
     }
}

Thanks!

Title: Re: C++ auto keyword and autocomplete
Post by: Dennis on October 06, 2015, 04:11:25 pm
Full C++ 11 support was a feature we planned, but it got delayed.  We plan to have it for the first point release (20.0.1).  As for the current state of support, the first case (xx. ) worked for me.

Also, shouldn't the for loop be:
Code: [Select]
   for (const auto &ele : vdmy)
Title: Re: C++ auto keyword and autocomplete
Post by: Dennis on October 07, 2015, 06:37:57 pm
Quick update on this one:  I was able to put in support for the range-based for expression Context Tagging pretty easily, so the fix will be in the next beta.
Title: Re: C++ auto keyword and autocomplete
Post by: hs2 on October 07, 2015, 07:15:07 pm
Good news Dennis :)
Is 'for (auto&& ele : vdmy)' resp. rvalue references in general supported as well ?
I'm looking fwd to 'C++11/14' support. Wasn't and isn't so easy I guess..
HS2

Title: Re: C++ auto keyword and autocomplete
Post by: Dennis on October 08, 2015, 12:44:01 am
Hmmmmm, will, it works if you put a space between the ampersands.  I'll have to see if I can find a way to handle the ambiguous && syntax.
Title: Re: C++ auto keyword and autocomplete
Post by: Dennis on October 08, 2015, 01:13:44 am
&& case fixed.
Title: Re: C++ auto keyword and autocomplete
Post by: hs2 on October 08, 2015, 06:44:16 am
 ;D Thanks Dennis !