5

Coming from a primarily C# background, I used ReSharper for many years. Being able to place my cursor on an unresolved reference, hit Alt+Enter, and select an option to add the appropriate using statement was invaluable. Now, Visual Studio 2017 has this capability natively! With this (and many other features added in VS2017) I got rid of ReSharper and am enjoying a very fast and responsive Visual Studio experience.

I've recently started doing some work in C++, and while I do get suggestions from Intellisense about fields and methods, when it comes to an unresolved reference it doesn't suggest any headers to #include.

My question is whether or not Visual Studio 2017 added the feature to suggest #include options for C++ or not? After scouring around, it seems Visual Assist X and ReSharper C++ have this feature, but I can find nothing detailing whether this feature is now available natively (and if it is, how do I enable it?) or whether it is still an extension exclusive.

Shaun Hamman
  • 2,287
  • 4
  • 21
  • 33
  • 4
    To my knowledge, its not yet a native feature – Tom Jun 06 '18 at 07:55
  • 1
    Sorry, but I can't help myself but to ask. Visual Studio is fast and responsive ... since when? I have a HP Z-series workstation, and it's laggy, and unresponsive most of the time. As for your question, I haven't seen that in VS personally. – mutantkeyboard Jun 06 '18 at 07:58
  • 2
    @mutantkeyboard Visual Studio 2015 was a bit of an improvement over previous versions (which were increasingly really bad performance-wise), but starting in 2017 they've really focused on general usage performance (particularly solution load times) and build time improvements. However, any long time user will almost certainly have ReSharper installed, and it will drag VS's performance through the mud on even moderate size solutions. As JetBrains refuses to utilize Roslyn or make ReSharper a true out-of-process extension, that performance isn't likely to improve any time soon. – Shaun Hamman Jun 06 '18 at 08:03
  • 1
    Part of the problem with this idea is that if you wanted to use class XXX, and in one header you have `class XXX {};` and in the other `class XXX;` which should be suggested for inclusion? It might be that the latter would do perfectly well. – UKMonkey Jun 06 '18 at 10:07
  • @UKMonkey I would expect it to work the same way the feature does in C#, it would suggest both, showing you the file paths and allowing you to make the decision. – Shaun Hamman Jun 06 '18 at 14:18
  • @mutantkeyboard it's fine - once it's finished loading. – Paul Sanders Jun 06 '18 at 20:59
  • 1
    @Shaun Hamman, I didn't find the extension tool before even if I know that VS Code has an extension called Include Autocomplete. If possible, I suggest you submit a feature request to the product team: http://visualstudio.uservoice.com/forums/121579-visual-studio. – Jack Zhai Jun 26 '18 at 06:10

1 Answers1

0

It seems Intellisense does not, as of Visual Studio 2017, support suggesting headers to include for C++ types. As recommended by @Jack Zhai-MSFT, I have opened a user-voice issue for this request.

Shaun Hamman
  • 2,287
  • 4
  • 21
  • 33