Autocomplete for auto variables

I have a function that returns a shared_ptr to a resource object. This is called and stored in a variable declared auto. If I spell out the type auto completion works. If I use auto it doesn't. Is there anyway to make this work with auto. I really don't want to write out the type everywhere for lots of reasons. 

 

Summary:

std::shared_ptr<foo> bar() {

  return std::make_shared<foo>(...);

}

 

int main() {

  auto baz = bar();

  baz.<get no autocomplete>;

  baz-><get no autocomplete>;

  std::shared_ptr<foo> wat = bar();

  wat.<see all of the functions in shared_ptr>;

  wat-><see all the functions in foo>;

}

 

2
Avatar
Permanently deleted user

I have tried this with 2017.2 and the 2017.3 EAP. 

0

请先登录再写评论。