Author Topic: C++ auto keyword and autocomplete  (Read 4143 times)

blingbiskit

  • New Community Member
  • Posts: 1
  • Hero Points: 0
C++ auto keyword and autocomplete
« 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!


Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: C++ auto keyword and autocomplete
« Reply #1 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)

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: C++ auto keyword and autocomplete
« Reply #2 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.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: C++ auto keyword and autocomplete
« Reply #3 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


Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: C++ auto keyword and autocomplete
« Reply #4 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.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: C++ auto keyword and autocomplete
« Reply #5 on: October 08, 2015, 01:13:44 AM »
&& case fixed.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: C++ auto keyword and autocomplete
« Reply #6 on: October 08, 2015, 06:44:16 AM »
 ;D Thanks Dennis !