Paul Krill
Editor at Large

Visual Studio 2022 adds C++ atomics

news
Dec 22, 20223 mins

Version 17.5 Preview 2 brings a wide range of improvements to the IDE including an experimental implementation of C11 atomics in MSVC.

Developers work together to review lines of code in an office workspace.
Credit: Joyseulay / Shutterstock

Visual Studio 2022 17.5 Preview 2, the second preview of a planned upgrade to Microsoft’s signature IDE (integrated development environment), adds a number of usability improvements including a new search experience, .NET capabilities such as publishing ASP.NET projects to Azure Container Apps, and C++ capabilities such as experimental support for C11 atomics.

Visual Studio 2022 17.5 Preview 2 was published December 13, and is now accessible from the Visual Studio website. For C++, Microsoft has added an experimental implementation of C11 atomics to MSVC (Microsoft C++), available as an option with the /experimental:c11atomics flag in /std:c11 mode or later. Operations on atomic types are operations that are guaranteed to be executed as a single transaction.

Currently only lock-free atomics are supported, but plans call for extending support to locking atomics as well. C11 atomics add the <stdatomic.h> library header, the _Atomic(T) type specifier, and the _Atomic qualifier. The _Atomic qualifier is particularly useful for declaring structs or variables of structure types, because it does not require parentheses.

Also with Visual Studio 2022 17.5, Go To Definition for C++ now will use a more subtle indicator when the operation is taking more time, replacing the previous modal dialog. Microsoft also is shipping a native Arm64 Clang toolset with its LLVM workload, allowing native compilation on Arm64 machines. In another C++ improvement, Hot Reload now is supported in the CMake Project template, allowing developers to modify projects while running.

For .NET, Visual Studio 2022 17.5 now supports publishing to Azure Container Apps via Right-click > Publish for ASP.NET projects. This allows for publishing on demand and setting up CI/CD via GitHub Actions. Developers can view the application output for ASP.NET Core projects in the Integrated Terminal Tool Window instead of an external console window. If multiple ASP.NET Core projects are launched, each will show its output in a different Integrated Terminal Tool Window.

Also in Visual Studio 2022 17.5:

  • A new search experience in the IDE makes it easy to quickly find menu feature files, types, and members in code all from one place. Improvements have been made to ordering and relevancy in code search. A preview panel in code search, meanwhile, supports code results for both C# and C++.
  • A Sticky Scroll feature helps developers orient where they are in a file and understand the context of code.
  • A new and improved text visualizer has additional tools and string manipulation options. Developers can do URL Encode and Decode, Base64 Encode, and Decode JWT easily.
  • A Quick Add feature lets users add items to solutions without navigating through the New Item Dialog.
  • Developers now can export a configuration file to configure contents of an offline installation layout.

Visual Studio 2022 17.4 was released last month in conjunction with .NET 7. Visual Studio 2022, released in November 2021, brought 64-bit support to the IDE.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author