Microsoft releases Visual Studio 2022 17.8 for C++ developers, with new C++23 and C++26 features And makes C++23 standard library modules available in C++20 mode

2023-11-17 12:58:44

Microsoft is pleased to announce that Visual Studio 2022 version 17.8 is now available! This post summarizes the new features you can find in this release for C++.

You can tlcharger Visual Studio 2022 from the Visual Studio download page or update your existing installation en suivant la page Update Visual Studio Learn.

Bibliothque standard

Standard library modules standardized in C++23 are now available in C++20 mode. This is a cross-vendor extension, planned or also supported by libstdc++ and libc++.

The team also implemented several new C++23 and C++26 features, including increased support for Freestanding implementations and support for std::stacktrace in std::format.

Main editor

Create a Pull Request

You can now create a Pull Request directly in Visual Studio. Enter the New Pull Request window by clicking the link in the notification banner in Git Changes following the push, or from the top-level menu via Git > GitHub/Azure DevOps > New Pull Request.

Give the differences

Take advantage of the new diff summary view to focus on changes to your code.

Active in every comparison view, the new diff summary view lets you toggle context lines to speed up file comparison.

Productivit

Make member functions constant

Microsoft introduced a feature that suggests making member functions const when they do not modify the state of the object. You can hover over a member function and click the light bulb icon to quickly jump to the suggestion and mark the function as const.

This feature is enabled by default as a suggestion. You can configure its settings by navigating to Tools > Options > Text Editor > C/C++ > Code Style > Linter.

Make a global function static

Visual Studio now prompts you to mark global functions as static. When you encounter a global function that doesn’t have a direct declaration, Visual Studio offers you a suggestion, symbolized by a screwdriver icon.

You can adjust the settings for this feature in Tools > Options > Text Editor > C/C++ > IntelliSense.

Clean and sort #include directives

You can now automatically sort and clean up your #include directives.

Unused #include directives will be faded in the editor. You can hover over a dimmed include and use the light bulb menu to remove that include or all unused includes.

It is now possible to add #include directives for entities that are currently included indirectly via other headers. For example, if you use std::string in your code but don’t include #include , the code will still work if another header you include transitively includes the correct header. This makes the code fragile to changes in other headers. If #include cleanup detects indirect headers, a quick action (indicated by three dots in the default view) appears. Hovering over it will inform you that the contents of this transitive include are being used. You then have the option of adding the direct inclusion individually or adding all the transitive inclusions used.
To automatically sort #includes, right-click any #include statement. Then, hovering over the #include directives option in the context menu, you will see the “Sort #include directives” option appear.
You can also configure transitive include cleanups and include sorting through the Code Cleanup entry. First, open the Code Cleanup configuration menu via Analyze > Code Cleanup > Configure Code Cleanup, or by clicking the arrow next to the broom icon in the bottom status bar and selecting Configure Code Cleanup. Add the features you want to the Included Fixers section, then click the broom icon to run them.
You can configure include cleanup and sorting in Tools > Options > Text Editor > C/C++ > Code Cleanup.
Game development

Unreal Engine Test Adapter

Streamline your testing process without leaving the IDE with Unreal Engine Test Adapter. You can now discover, run, manage and debug your Unreal Engine tests. In Visual Studio 2022 version 17.8, your Unreal Engine tests will automatically appear when you open Visual Studio. To view your tests, you can open Test Explorer with View > Test Explorer.

The latest version of the free tool Visual Studio Tools for Unreal Engine is required to use Unreal Engine Test Adapter. Additionally, make sure that the “Unreal Engine Test Adapter” component of the “Game development with C++” workload is enabled in the Visual Studio installer.

Suggestions for specifying macros for Unreal Engine

This is currently an experimental feature that will be gradually made available to Unreal Engine developers in the coming weeks.

One of the most common pieces of feedback we receive is suggestions for macro specifiers for Unreal Engine. We are happy to announce that macro specifiers will begin appearing in the member list suggestions for reflection macros in Visual Studio 2022 version 17.8. This feature will allow you to quickly access all possible specifiers for the respective macros without relying on your memory or switching between software and documentation.

Build Insights Features View

Build Insights is now integrated into Visual Studio 2022 and works with MSBuild and CMake projects using MSVC. In Visual Studio 2022 version 17.8, you can now see additional information related to function generation. The new Functions view will tell you how long it takes to compile a function as well as the number of associated ForceInlines.

Start your Build Insights .etl trace capture by going to the Build menu.
After compilation, Build Insights creates a diagnostic report that shows the function generation time as well as the ForceInlines.

Read more

Source : Microsoft

And you ?

What do you think of this version 17.8 of Visual Studio and the features it offers?

See as well

Microsoft announces Visual Studio 17.8 with improvements to productivity, programming languages, and business management, plus full integration with .NET 8

Visual Studio 2022 17.8 Preview 3 is available, this version improves stability and reliability, and integrates a new tool for structured error diagnosis

Visual Studio 2022 17.8 Preview 2 is available, bringing C11 Threading support and launch.json support for open folder

1700228717
#Microsoft #releases #Visual #Studio #developers #C23 #C26 #features #C23 #standard #library #modules #C20 #mode

Leave a Replay