To increase the accuracy of auto-import and code completion, ReSharper C++ 2020.2 introduces support for the Unreal Engine project model. This means that ReSharper C++ is now able to read project information directly from .uproject files, without using the intermediary project files generated by Visual Studio. The new project model provides more refined lists of suggested items that depend on the plugin and module references. ReSharper C++ will also adjust its behavior when you switch the solution configuration.
ReSharper C++ will now also remind you to refresh your Visual Studio project in Unreal Editor if the project files are out of date.
For easier navigation, symbols from engine sources are now treated as library symbols and will be hidden by default from the search results if there is a matching symbol in user code.
To match the
Unreal Engine coding standard, ReSharper C++ 2020.2 includes several updates to
inspection severity, code generation actions, and auto-import of
Also, a new inspection with a quick-fix is
available for adding the
virtual specifier to overriding functions.
ReSharper C++ 2020.2 includes a lot of bug fixes and brings improved interoperation of C++/CLI with C#. When looking for derived symbols in C++/CLI code, ReSharper C++ finds symbols in C# code in addition to symbols in C++/CLI. Navigation to base and derived symbols also works on imported CLR entities.
New code inspections with quick-fixes are available for the
The following features have had their their scope and applicability extended:
ReSharper C++ can now automatically highlight usages of the element under the caret as you move through your code.
In the File Structure window, preprocessor directives are now hidden by default so you can navigate through large files more easily.
New inspections are available with corresponding quick-fixes that help you with the following cases:
gcnewon a native type and cannot use new on a managed type.
finalspecifier cannot be used for managed classes.
ReSharper C++ now also highlights spelling mistakes for preprocessor directives.
With a brief preview of Clang-Tidy quick-fixes, it's now easier to select the required fix option.
The evaluation engine has been updated with support for the modification of values inside
constexpr functions and can work with the values of class types.
A new completion item can insert an auto-generated lambda argument when a
std::function parameter is expected.
If a class is not included in the current file, import completion will suggest a new option to add a forward declaration instead of including the corresponding header file.
ReSharper C++ 2020.2 adds three new settings for more flexible configuration:
?:operator – a formatting option for multiline ternary expression.
//on Enter in multi-line // comments – an editor option to prevent the auto-extension of multi-line comments in single-line style.
#include ordering settings have been moved to a separate options page and are now
easier to find – just click Order of #includes under the Code Editing | C++
Last but not least, the formatting engine now works significantly faster in source files with many macro calls.
There are more updates from ReSharper itself. For example, code cleanup can now be launched automatically on save or applied only to the changed parts of recently modified files. You can learn more about these improvements here.
Free 30-day trial
The C++20 standard has almost been signed off on, and ReSharper C++ introduces support for one more set of its features.
ReSharper C++ 2020.1 adds support for using enum declarations, which let you bring specific enumerators from a scoped enumeration into the local scope. A new refactoring, Introduce Using Enum, is available to help you add using enum declarations to existing code.
For C++20's Concepts, ReSharper C++ supports the new syntax for constrained type placeholders and abbreviated function templates. Improved error messages about unsatisfied constraints help you understand what went wrong during template substitution.
ReSharper C++ also suggests a quick-fix for using template syntax for lambdas when doing so helps you avoid errors or unify your use of lambdas and functions.
ReSharper C++ 2020.1 improves the Rename refactoring in Unreal Engine projects. Now it updates the corresponding
*.generated.h include directive and related files with the
When ReSharper C++ detects an Unreal Engine project, it tweaks the default settings to stop suggesting Use auto to better align with the Unreal Engine guidelines. Also, ReSharper C++ 2020.1 includes updated naming rules for console variables and log categories. You can now navigate to namespaces that contain an enumeration in the Unreal Engine style from Search Everywhere/Go to.
Finally, ReSharper C++ now also supports USF files with virtual file paths and SpatialOS GDK. Learn more.
ReSharper C++ 2020.1 now provides initial support for HLSL, the High-Level Shading Language. ReSharper C++ highlights HLSL code according to your default color scheme and displays inlay hints and tooltips for code elements with type information and documentation. You can also search for and quickly navigate to structs, functions, or parameters in your entire solution, referenced files, and standard libraries. And to perfect the HLSL experience, ReSharper C++ offers you smart code completion, auto-inserting matching delimiters, and more.
Several new inspections are available for the following issues, with corresponding quick-fixes that help you resolve them:
reinterpret_castused instead of a
static_castwhen casting to
Two more features help you adopt the C++17 maybe_unused attribute:
[[maybe_unused]]to an unused parameter or variable.
The completion list now suggests label names, standard C++ attributes, the new
std::forward postfix template, and arguments for calls to a base function. Additionally, ReSharper C++ now provides code completion in macro bodies.
Two well-known features from ReSharper for .NET have finally come to ReSharper C++:
With improved typing assistance, you can now select any piece of code and type a parenthesis, brace, bracket, or quote to surround the selection with the corresponding characters. The code readability helpers – parameter name hints and type hints – are now available in dependent code.
The new Document edit action, bound to Ctrl+/ by default, lets you quickly generate a documentation comment for the nearby code element instead of using the context action.
ReSharper C++ 2020.1 introduces two new refactorings to help you upgrade your enum usage:
using enumdeclaration and shortens enumerator references to make your code easier to read.
Code navigation features have been extended to be even handier:
In the File Structure window, the icons now have indicators for class member accessibility, inheritance, and virtual/static/pure specifiers.
ReSharper C++ 2019.3 allowed you to sort
#include directives, rearrange existing groups, and create new ones separated by blank lines. ReSharper C++ 2020.1 adds two new settings to make this action even more configurable:
And it's now possible to import the sorting settings from a
.clang-format file if Read code style from .clang-format style is checked on the ReSharper | Options | Code Editing | General Formatter Settings page.
ReSharper C++ 2020.1 comes with several other noteworthy changes:
MOCK_METHODmacro introduced in GTest 1.10.
Also, more changes are coming from ReSharper itself. For example, unit test sessions can now be exported and imported.
C++20 is feature-complete and will be officially signed off next year to provide C++ developers with a range of long-awaited goodies. ReSharper C++ 2019.3 already supports many of these features, augmenting them with additional analysis and insights.
Not only are concepts supported in ReSharper C++’s parser, but Rename refactoring and Find Usages are also available. Even better, code analysis can show you more details about errors related to Concepts. For example, if the overload resolution fails because a Concept’s requirement is not satisfied, you’ll see all the details in a tooltip. By the way, in ReSharper 2019.3 we’ve also added color to the tooltip that shows the details on the overloading resolution failures.
We’ve started a series of C++20 and ReSharper C++ blog posts, which you can use to learn about the new language features and their adoption in ReSharper C++.
If you find a Clang warning too distracting, you can now disable it from the inspection menu. And for all code checks, you can now suppress the corresponding inspection for all such issues in the file – simply use Disable in file with comment, or even suppress all inspections in the file with Disable all inspections in file with comment.
As you type a lambda body, a new quick-fix will assist you with adding variables to the lambda capture list. No need to do it manually – just place the caret on a variable in the lambda body and press Alt+Enter. ReSharper C++ will suggest a list of options for how to update the capture list.
In this version, we’ve upgraded the built-in Clang-Tidy binary to Clang 9, to give you many new code checks and accompanying fixes. Importantly, the bundled binary no longer prevents modifications to the source files. Clang-Tidy also starts more quickly as it doesn’t wait for all other ReSharper C++ analyses to finish.
Clang-Tidy settings were improved in a couple of areas:
ReSharper C++ gives you hints about your code to help improve its readability. New code hints added in v2019.3 help you identify types that might not be obvious when you look at modern C++ code:
In ReSharper C++ 2019.3, several live templates were renamed to match the corresponding language keyword. For example, to generate a class, type class (was cls before); for structures, use struct instead of str; and use similar logic for unions, enums and namespaces.
Go to file member was improved in two ways:
In initializer lists, code hints help you better understand what you are actually initializing. Now, you can also navigate to the aggregate class from the opening brace of a brace-enclosed initializer list.
In ReSharper C++ 2019.3, it’s now possible to export
your formatting settings to a .clang-format file. Use
ReSharper | Options |
Code Editing | General Formatter Style | Write current style to .clang-format.
Two new formatter options were added to control the spacing:
ReSharper C++ 2019.3 can now check the order of the
#includes directives in your code. Simply provide the ordering settings,
and a corresponding inspection and a quick-fix will help you notice if they’re
out of order and reorder them in no time.
When ReSharper C++ detects you are developing an Unreal Engine project, it adjusts its behavior to be more UE4-specific.
The “new” postfix template for
UCLASSes expands to a proper factory function call
(which will register the created object in the garbage collector).
Live templates with the corresponding names are now available to help
you quickly generate
Unreal Engine’s Smart Pointers (
TSharedPtr, TSharedRef, TWeakPtr, TUniquePtr)
are now handled by ReSharper C++ similarly to
std::shared_ptr/std::unique_ptr. This means features like Parameter Info,
code analysis, and postfix code completion work for Smart Pointers.
Finally, there are some performance improvements for UE4 projects. For example, we fixed a hang after "Refresh Visual Studio Project" in the UE4 editor.
For custom compiler toolchain or custom build tool cases, ReSharper C++ 2019.3 adds ReSharper Project Properties. They are stored in the ReSharper settings and allow you to specify:
Thanks to some improvements in the code highlighting engine, re-highlighting now happens faster. After a function’s body is changed, only the body will be reanalyzed.
Find Usages was sped up by adding a heuristic based on the graph of includes. This helps by cutting out the files without any usages.
There are more changes coming from ReSharper. You can learn about them here.