What’s New in ReSharper C++ 2024.2

ReSharper C++ 2024.2 implements new C++23 features, enriches tooltips with information about type layout, and brings several improvements to the Rename refactoring. For Unreal Engine developers, ReSharper C++ 2024.2 provides support for struct traits and adds a new inspection that detects missing calls to base methods.

Download

Free 30-day trial available

C++23 support

ReSharper C++ 2024.2 adds support for the multidimensional subscript operator. Using operator[] with several arguments lets you better support multidimensional containers and views.

ReSharper C++ now also understands the #elifdef and #elifndef C++23/C23 preprocessor directives that complement the existing #ifdef and #ifndef directives.

[[assume(<expr>)]] is a new attribute in C++23 that adds a portable way to provide additional information to the optimizer using an argument expression. ReSharper C++ now parses the argument and supports all the usual code intelligence features inside it.

Unreal Engine

ReSharper C++ now recognizes Unreal Engine struct traits. In the structs annotated by struct traits, ReSharper C++ checks that the required methods are present and generates them if they are missing.

A new inspection detects missing calls to base methods, particularly in the BeginDestroy and GetLifetimeReplicatedProps methods. The accompanying fix inserts the required Super call.

Another new inspection flags usages of IOnlineSubsystem::Get() and replaces them with Online::GetSubsystem(this->GetWorld()).

If you’re interested in a standalone cross-platform IDE for Unreal Engine development, consider Rider. The Unreal Engine support in Rider and ReSharper C++ is aligned, and you can expect the same improvements in the Rider 2024.2 update.

Type layout

Quick info tooltips now include information about type layout. Just hover over a class or a class field to check its size and alignment.

When you hover over a class field, you’ll additionally see the offset of the field from the start of the object and the padding that is added after the field.

Rename improvements

When you rename a file, ReSharper C++ now provides a new option to rename the related files with the same name. For example, if you rename a header file, the .cpp file that includes the header will be renamed as well.

Another file renaming option lets you automatically rename the type inside the file to match the new file name.

Finally, when renaming a namespace in a file with a matching name, you have an option to automatically rename the containing file.

Code analysis

We’ve upgraded the bundled clang-tidy binary to Clang 18, bringing new checks and improvements from the latest LLVM release.

Similar to the support for NOLINT comments in the 2024.1 update, ReSharper C++ now recognizes include-what-you-use pragmas to suppress the Possible unused #include directive inspection.

We’ve added a fix to use reinterpret_cast on conversion errors where either the source or the target type is a pointer to char or std::byte.

Miscellaneous

The Why is ReSharper suggesting this? option in the inspection menu now links to the C++ Core Guidelines related to the code inspection.

The Base method call filter is now available in the Find Results window to let you filter out calls to base methods from the usages list.

ReSharper C++ now features asynchronous typing, which is a part of the ongoing effort to improve ReSharper’s performance by enabling it to run out of process with Visual Studio. Our internal tests show that enabling asynchronous typing improves the smoothness of the typing experience.

ReSharper C++ also improves compatibility with CMake projects in Visual Studio, fixing several important issues and improving performance when editing code.

Take a look at the What's New in ReSharper page to learn about all the other changes introduced in this release.

Download

Free 30-day trial available