Talk about a big wave of updates in VS2019 v16.8 Preview 3

A large wave of in-transit updates detected

For C++ developers, Visual Studio 2019 v16.8 Preview 3 introduces a large number of updates, mainly covering standardization, performance improvement and productivity improvement. Next, let's take a look.

C++20

We have made improvements to support the main C++20 features from all levels of the compiler, standard library and IDE. Now you can use the new things in C++20 such as Modules, Concepts, Coroutines and Ranges (partially supported) in the same project.

C++20 Coroutines has been developed and can be used through the compiler option /std:c++latest. When using C++20 Coroutines, please note that you need to include this header file. The previous old version is still available under the <experimental/coroutine> and /await compilation switches. For details, please refer to the previous article on C++20 Coroutines.

C++20 Modules have also been developed and are also available under the /std:c++latest compile switch. This feature includes support for header file units and experimental MSBuild. With Modules, Visual Studio can automatically analyze the dependencies between modules and build them in the correct order. For details, please refer to the previous article on C++20 Modules. .

At the same time, we also partially support C++20 Ranges. At present, the development team is still working hard to achieve complete support for Ranges. This release includes support for most of the algorithms based on Ranges.

In addition to Ranges, we have also updated and optimized the STL standard library. Here are some key points:
> Through std::atomic_ref, atomic operations on non-atomic objects can be achieved.
> The implementation of std::midpoint and std::lerp has now become constexpr.
> std::execution::unseq indicates that an algorithm execution process can be implemented as vectorization in a single thread.
> We manually vectorized std::reverse_copy.
For details, please check the ChangeLog of the STL standard library.

IntelliSense can now provide scanning recognition of C++20 and header files, renaming and browsing of concept definitions. There will be a known issue, which we will resolve in the upcoming Preview 4.

 

In addition, support for [Conditionally trivial special member functions] has been added to MSVCZ.

C11 / C17

All major C11 and C17 features have been supported and can be used under the compilation switches /std:c11 and /std:c17. It mainly contains the following points:
> _Pragma
> restrict
> _Noreturn and
> _Alignas, _Alignof and
> _Generic and header files
> _Static_assert

Because some optional features are not yet supported, we cannot say that we currently support C99.

vcpkg

vcpkg now supports binary caching and manifest files.
The manifest file named vcpkg.json should appear in your project directory and can be easily submitted to the version control system.
You can add library dependencies to this file so that vcpkg can automatically install those dependent libraries.
The following is an example of a manifest file:

 

When vcpkg is compiled for the first time, the generated binary files can be cached, so as to avoid saving duplicate files. The location of the cache can be set to any location in the file system, or it can be set to a remote shared directory or a manual storage location. For details, please see our article on vcpkg.

CMake sum Linux

The CMake version that comes with Visual Studio has been upgraded to version 3.18. Developers can use the latest CMake tuning features in this version.
You can also directly debug Core Dump files generated in WSL or remote Linux on Visual Studio. This feature is really useful for developers who need to deploy on Linux but want to use familiar debugging tools for debugging.

 

We optimized the error message of missing compilation tools for Linux projects. In the previous version, you will encounter a lot of errors when compiling and debugging. The current change is that we directly display a clear and easy-to-understand error message on the toolbar and error list to tell you what is missing tool.

 

productive forces

Based on the code linter of the IntelliSense engine, we can display new warning prompts and quick fixes in the text editor.
You can configure them in [Tools->Options->Text Editor->C/C++->CodeStyle->Linter + Fixup].
For arithmetic overflows that may occur in the code, uninitialized local variables and converting a divisible result to floating point, the text editor will give a reminder, as shown in the following figure:

 

Code analysis

At present, our code analysis tool can support SARIF 2.1 standard: industry standard static analysis log format.
SARIF 2.1 enhances the code analysis experience in Visual Studio, including error lists in regular and background modes, quick fix tips, etc.
Looking for that in a future version, we also plan to distinguish the code prompts in different colors (information/warning/error) based on the information in the SARIF log.

to sum up

I was suddenly surprised: Big Brother Microsoft, she really did not forget us working people who are engaged in C++.
Please, persist a little bit more on the road of developing C++.

At last

The blog of the Microsoft Visual C++ team is one of my favorite blogs. It contains a lot of knowledge about Visual C++ and the latest developments. If you are still interested in the ancient technology of Visual C++, you can often visit them (or me).
This article is from: "A Multitude of Updates in Visual Studio 2019 version 16.8 Preview 3"

Guess you like

Origin blog.csdn.net/mmxida/article/details/108689909