Early Access Program

ReSharper C++ 2022.3 Early Access Program Is Open!

ReSharper C++ opens its EAP with improvements for C++ support and new formatting options. Read on for details and give the new build a try!

If you’re not familiar with our Early Access Program (EAP), we roll out free-to-use preview builds each week for developers to test with their code. The EAP builds let you try out all the latest improvements, but these builds might be unstable since they are works in progress. You can get the EAP builds via the Toolbox App or download them from our website.

ReSharper C++ 2022.3 EAP

DOWNLOAD RESHARPER C++ EAP1

We’ve introduced support for the #pragma pack directive, which modifies the current alignment rule for the members of structures. ReSharper C++ now correctly computes the sizes of packed structures so you can rely on analysis and highlighting for static assertions.
#pragma pack

The recently released ReSharper C++ 2022.2 brought a lot of improvements for working with emplace-like and make-like function calls. However, these features were limited to classes and functions from the standard library. Starting with the first EAP build of 2022.3, ReSharper C++ can now show you parameter info and inlay hints for any function or method that implies a constructor call!

To check out these enhancements, make sure that the function template is limited using SFINAE or a requires-clause with type traits and concepts that restrict T to be constructible from a given arguments pack. This could be std::enable_if with the std::is_constructible type-trait, or requires std::constructible_from<T, Args...>, or any similar construction.
std::is_constructible type-trait

As you may have noticed in the screenshot above, ReSharper C++ now includes the function origin in parameter info and other function tooltips. The updated tooltips now show you when a function is implicitly generated (e.g. constructors or assignment operators), built in (e.g. operator+ for fundamental types), or compiler intrinsic (e.g. functions with the __builtin_ prefix).
function origin in parameter info and other function tooltips

We’ve also introduced a useful new context action that replaces && with || and vice versa inside a boolean expression, following De Morgan’s laws.
Replaces && with || and vice versa

For better-looking code, we’ve added a number of new formatting options for configuring:

  • Spaces before and after ellipsis () in parameter packs.
  • The number of blank lines that are acceptable to present in declarations and in the rest of the code.
  • Whether blank lines are kept or removed after an opening brace ({) and before a closing one in declarations and in the rest of the code.
  • Blank lines before and after access specifiers.

All the new formatting settings can be found, as usual, on the Code Editing | C++ | Formatting Style page of the ReSharper options.

Finally, we have a small but important update for Unreal Engine projects: ReSharper C++ no longer offers unwanted entities from system headers in auto-import suggestions. By default, system headers are not suggested, but if you want them to be, you can enable them in Options | Code Editing | C++ | Unreal Engine.

Those are all the highlights for today! The full list of issues we’ve addressed is available in our issue tracker.

Give the new build a try and let us know what you think. We love hearing from you!

DOWNLOAD RESHARPER C++ EAP1

Your ReSharper C++ team
JetBrains
The Drive to Develop

image description