ReSharper C++
The Visual Studio Extension for C++ Development
ReSharper C++ 2023.1 Early Access Program Is Now Open
We’re launching the Early Access Program (EAP) for ReSharper C++ 2023.1! If you’ve never participated in one of our EAPs, in short, this means that we’ll be rolling out a new build every week, and these builds are free to use. We encourage you to take part and share your thoughts on the latest improvements and features so we can make ReSharper C++ better for you.
You can download the EAP builds from our website or via the Toolbox App.
Here are some of the highlights of the first EAP build. The full list of issues we’ve fixed in this update is available in our issue tracker.
- C++20 modules: Rearrange code and formatting for
export
blocks and exported entities. - Unreal Engine: completion for lambda signatures and file templates for tests.
- Refactorings: improvements to Change signature and Extract method.
- Create from usage: new Create parameter quick-fix and an update for Create function.
- Other improvements and fixes:
as_const
postfix template and inspection for CTAD failures.
C++20 modules
We introduced support for C++20 modules just recently, in 2022.3. We’re continuing to improve how it works under the hood and expand the list of ReSharper features available for new code entities.
The first EAP build comes with a ton of bug fixes for modules support, and it also includes some nice additions that improve the overall modules experience.
The Rearrange code feature has long allowed you to quickly move your code. It now also works for export
blocks and exported entities! To rearrange code, press Ctrl+Shift+Alt
with the caret on the code element or with a code selection, and then press the corresponding arrow key:
- Press
Up
orDown
to move the code relative to other elements in the same scope or between neighboring scopes. - Press
Left
orRight
to move the code out of or into the exporting scope.
Additionally, code formatting now correctly formats export
blocks and exported entities.
Unreal Engine
ReSharper C++ now suggests you autocomplete lambda signatures where a delegate, TFunction
, or TFunctionRef
is expected. That’s one less boilerplate task you have to worry about!
Our set of Unreal Engine file templates has some new items! You can now quickly generate templates for both simple and complex Unreal Engine tests. Just go to Solution Explorer and right-click on the preferred project folder to open the Add menu (or use Ctrl+Alt+Insert
).
Refactorings
This build includes many bug fixes and usability improvements for the Change signature and Extract method refactorings.
These refactorings are now easier to access. We’ve made it possible to invoke them via context actions from the Alt+Enter
menu.
Change signature can now be called from anywhere on function signatures instead of just function names, as was previously the case. Just press Alt+Enter
or invoke the refactorings menu (Ctrl+Shift+R
), no matter where your cursor is.
Calling Extract method is now easier, as well. If you need to extract a one-line function, you no longer have to select the whole line, since the refactoring now, by default, extracts the current line when there is no active selection.
Create from usage
We’ve added a new quick-fix for unresolved identifiers. If you have an identifier that needs to be passed as a parameter, select the Create parameter quick-fix from the Alt+Enter
menu to invoke Change Signature.
A similar quick-fix for generating definitions for unresolved functions has also received an upgrade in this EAP build. The Create function quick-fix now prefers to pass parameters by value instead of by const
reference where doing so makes sense (for example, string_view
and span
).
Other improvements
A new postfix template allows you to quickly make a const
reference with std::as_const
or AsConst
in Unreal Engine projects.
We’ve also added a new inspection that shows an error when a class template argument deduction (CTAD) fails.
And our last notable addition is for parameter name hints, which now work when functions are called through function pointers (RSCPP-25339).
Here are this build’s most noteworthy bug fixes:
- ReSharper C++ no longer breaks when you switch CMake solutions (RSCPP-33686).
- Generate definition should no longer occasionally generate definitions in the header file instead of the source file (RSCPP-32958).
- Scoped fixes now work in non-project files (RSCPP-33613).
Those are the biggest highlights for this first EAP build. Please report any issues you encounter to our issue tracker, and stay tuned for the next build update!
Your ReSharper C++ team
JetBrains
The Drive to Develop