Early Access Program

ReSharper C++ 2023.1 EAP: __VA_OPT__ and Updates for Modules

A new EAP build for ReSharper C++ 2023.1 is here! Read on for details about features we’ve introduced over the last few builds and give the new version a try.


C++20 macro __VA_OPT__

The long-awaited support for __VA_OPT__ is finally here! This special functional macro was introduced in C++20 to make variadic macros easier to use without arguments. If there are no variadic arguments, then __VA_OPT__(content) expands to nothing. Otherwise, it is replaced by content, which can contain any admissible replacement text, including __VA_ARGS__. Give it a try with our recent improvement for working with macros – the macro substitution preview in tooltips:

С++20 modules

We keep improving how ReSharper C++ works with C++20 modules. This EAP build resolves two limitations in the initial support:

  • With the updated Find usages, you can now find all locations where a given module is imported.
    Completion for C++20 modules
  • You can now use the Rename refactoring to safely rename module partitions and named modules.
    Rename C++20 module

Unreal Engine

ReSharper C++ offers a new UINTERFACE live template for Unreal Engine solutions. Similar to the existing UCLASS, USTRUCT, and UENUM live templates, it allows you to quickly add a new interface class:
UINTERFACE live template
You can use the Templates Explorer (ReSharper | Tools | Templates Explorer) to edit the templates according to your needs and development practices.

Code analysis

We’ve introduced two new inspections to warn you about potential code issues:

  • Unused template parameterUnused template parameter
  • Unused return value of HRESULT/NTSTATUS typeUnused return value of HRESULT/NTSTATUS type

This build also includes many bug fixes and improvements for compile-time evaluation, including evaluation of unions and range-based for loops.

Other changes

Convert to scoped enum and a set of refactorings to Introduce variables, fields, using enum, typedef, and namespace aliases are now available as context actions in the Alt+Enter menu.

Comments beginning with /* are no longer auto-closed with */ by default. You can enable auto-insertion of the closing comment with the new Insert */ after /* typing-assist option:
Auto-insertion of the closing comment

We’ve also added a new formatting option for spaces around unary operators.

And last but not least, ReSharper C++ now supports C++23 alias declarations in init statements (P2360).

That’s all the news for today. As usual, this EAP build is free to use and available for download from our website or via the Toolbox App.


Your ReSharper C++ team
The Drive to Develop

image description