The second of our Early Access Program builds for ReSharper C++ 2020.1 is now available!
In this post, we’ll go through updates to C++20 support, new unit testing features, support for SpatialOS GDK, improvements to parameter name hints, and more.
Here is a list of the most notable improvements:
- Code completion offers the C++20 attributes
- Unreal Engine 4: support for the SpatialOS GDK – cross-server RPCs and new reflection specifiers.
- Unit testing: the option to use temporary files instead of named pipes; mock function generator supports GTest 1.10.
- Parameter name hints are now available in dependent code.
- Other changes.
As usual, you can download the new EAP build from our website, or via the Toolbox App.
The new C++20 attributes
[[unlikely]] now appear in the completion list.
You can use this attribute to mark a non-static data member that does not require a unique address. Such a data member can share its address with another data member if it has zero size. This allows the compiler to optimize the storage layout of the object so it occupies less space.
[[likely]] and [[unlikely]]
You can now provide additional information to the compiler to optimize your code and mark a path of execution that is more or less likely to be executed. You can tell the compiler that a specific loop is not usually executed, and the attributes also work for branches of an if statement and cases in a switch.
Unreal Engine 4
The SpatialOS Game Development Kit is an Unreal Engine 4 fork that helps you run and manage online games in the cloud. Starting with this latest 2020.1 EAP build, we provide support for the features that are specific to SpatialOS.
ReSharper C++ now recognizes the
UFUNCTION macro with the
CrossServer specifier as a cross-server RPC (Remote Procedure Call):
And there are more SpatialOS specifiers:
UCLASShelp SpatialOS understand how to manage network-relevant class information:
AlwaysInterested(receive all updates) and
Handover(multi-server zoning) for
The test runner in ReSharper C++ uses named pipes to communicate with child test processes to read unbuffered output. However, in some environments where security software is used on the machine, named pipes might misbehave. In particular, we received several reports of this happening with the McAfee security suite installed. One sign of this issue is having tests that remain in the “Inconclusive” state after a unit test run.
A new setting in this EAP build allows you to configure how to communicate with child processes. You can now disable the Use named pipes to communicate with child processes option to use temporary files instead. Please note that when this is the case, the status of unit tests will be updated only after the entire test run has finished.
The mock methods generator now supports the
MOCK_METHOD macro introduced in GTest 1.10. The family of
MOCK_(const_)METHODn() macros used in previous GTest releases is now deprecated.
Parameter name hints
Parameter name hints became an inherent aspect of the development experience with ReSharper C++ (check out our post about all the available hints). And now they are available in dependent code too:
- Better error messages about complex unsatisfied constraints when using C++20 Concepts. This work is in progress, so stay tuned!
- The Change Signature refactoring now accepts non-resolving types.
The full list of all the issues fixed in this EAP build can be found in our issue tracker. We look forward to your feedback!
Your ReSharper C++ team
The Drive to Develop