Provide refactoring for C++
Currently there is almost no refactoring support for C++. Even basic refactoring like renaming is missing.
In Visual Studio 2015 we’ve been working on adding Refactoring to Visual C++. Here’s the list of features we support so far:
• Rename symbol
• Extract function (as pre-release VS extension)
• Implement pure virtuals
• Create function definition/declaration
• Move function definition location
• Convert to raw string literal
• Precompile header refactor tool (as pre-release VS extension)
For more information, please review this blog and Channel 9 video:
We know we’re not done. Stay tuned for more announcements from us soon. But in the meantime we want to thank you for your support, return your votes and encourage you to spend them towards more specific asks in the C++ refactoring space – we’re keeping an eye on these and your input will influence the relative priority of the various refactoring features we plan to work on.
Visual C++ Team
Petr Laštovička commented
The Visual C++ Refactoring extension is not available for Visual Studio 2013 Express.
Julio Raffaine commented
Why not add a simple stuff like "Create Implementation" or "Add Stubs" ... this would help a lot!
Renaming and remove unused #includes are must have!
I highly support this idea, basic things like Renaming, Create Implementation, Create Declaration would be really really helpful.
It amuses me that free IDEs like Eclipse provide this functionality, even though it may not work in highly complex cases, yet a professional tool liks MSVS does not.
Herpin the Derps commented
I understand that providing refactoring for a language without built-in reflection capabilities brings several challenges to the table, and that stability and error-free behavior are essential for a refactoring tool, but come on Microsoft--how many product revs has the Compiler/IDE/Framework been through now!? Please do this now for the good of your own benefit.
When I see things like this:
, and I think of the time that has passed, and the resources you could actually throw at this issue to solve in a world-class way, and yet nothing is done to accomplish it...zip, nada, zilch...it makes me want to throw my hands up in disgust with the Visual Studio team, and with Microsoft in general.
Come on guys, you can do this better than anyone else. You've proved that by creating the world's best general-purpose debugger. You invented C++ AMP, and are finally playing nice with the standards body (Thanks, Mr. Sutter! :), so please...help us out here.
Personally, in addition to all the stuff in Refactor! and VAX, I would also like to see (<= C++98 idioms) --> (C++11 idioms) refactoring in VS 2014.
Thanks otherwise for a great platform.
I do not want to use Visual Assist! I know Microsoft can develop better tool!
+1 ! Stop considering C++ as the Cinderella of programming languages!
Refactoring support in C++ would be a huge boon for productivity as it is in C#.
I didn't realise how much I missed decent refactoring support until I spent a significant amount of time in C# with R# before going back to C++.
VAX is pretty good but it falls over for me every so often. If Microsoft could put some solid C++ refactoring tools into VS that would be a huge productivity boost for me.
Shaunak De commented
I understand that the semantics of C++ make it near impossible to provide a 100% accurate refactoring tool, but a simple rename tool, with appropriate warnings displayed to the user would be a welcome addition.
It would be nice to at least have a way to easily declare or implement a function from the other one. That is add a declaration at the end of the class from a definition just added in the source file. Or add/move a definition from the header to the source file. It should be possible to at least select between alphabetical order and add it at the end.
By the way auto-generated code for WinForms among other should be added to the source file if desired (and declaration in a specified region)
Jens Saathoff commented
I think this is an important thing. If you want refactoring for C++ you have to install Visual Assist from Whole Tomato. Why can't MS do it like the people from Whole Tomato? That's refactoring at it's best. Really!
David Ikeda commented
+1. I never really realized how useful these refactoring mechanisms are until I tried Visual Assist. It would be great to have this as a native feature in VS as I think VA really points out some of the limitations of VS when it comes to refactoring, intellisense, etc.
My only hesitance with the vote is that at least VA can provide these features through a plugin, so I would rather prioritize features that third parties can't provide in VS like C++11 support , but these are features that relate more to the IDE so it might be a separate group of people implementing them.
I do wonder if this feature might be better suited for the IDE or Editor section but I realize that this is specifically targeted to C++.