Author Topic: Using C++11 uniform initialization of POD struct breaks autocomplete  (Read 1664 times)

acarlow

  • Junior Community Member
  • Posts: 3
  • Hero Points: 1
Given a POD struct Student,

Code: [Select]
struct Student {
    std::string first;
    std::string middle;
    std::string last;
    int id;
}

Student aaron = {"first", "middle", "list", 83924};    // notice we used "=" here
aaron.      <---- auto-completion works here

Code: [Select]
Student aaron2 {"first", "middle", "last", 83842};    // In C++11 the "=" is redundantaaron2.     <---- auto-completion gives no completions here

If Student is modified to contain member methods (i.e. no longer a POD) then auto-completion works for the methods (but not other members) if the instance was initialized using the new "uniform initialization" syntax:

Code: [Select]
struct Student {
    std::string first;
    std::string middle;
    std::string last;
    int id;

    std::string getFirst() const;
}

Student aaron3 {"first", "middle", "last", 1234};
aaron3.       <--- getFirst() method is offered as a completion here, but not the other public members.

So basically uniform initialization of POD breaks auto completion from what I can see.
« Last Edit: February 27, 2014, 10:12:28 pm by acarlow »

brainsalad

  • Community Member
  • Posts: 11
  • Hero Points: 2
Re: Using C++11 uniform initialization of POD struct breaks autocomplete
« Reply #1 on: April 16, 2014, 03:37:44 pm »
Indeed, it does.  I hope it's fixed soon  :'(

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2555
  • Hero Points: 380
Re: Using C++11 uniform initialization of POD struct breaks autocomplete
« Reply #2 on: April 17, 2014, 01:31:36 pm »
I'll add this to my list for the next release.

brainsalad

  • Community Member
  • Posts: 11
  • Hero Points: 2
Re: Using C++11 uniform initialization of POD struct breaks autocomplete
« Reply #3 on: April 17, 2014, 01:52:42 pm »
I'll add this to my list for the next release.

Cool!  This is what makes me feel good about paying up.