C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Microsoft C++ Team at CppCon 2023
As always our team will be at CppCon this year with a host of presentations. Many of us will also be present at our team’s booth in the main hall for the first two days of the conference. Come say hi and let us know if you have any questions about our talks, products, or anything else! You can also join the #visual_studio channel on the CppCon Discord to talk to us (note: to join, head to #directory channel first, and check the checkbox next to "Visual Studio" box). We’re also running a survey on the C++ ecosystem. If you have a moment, please take our survey. It's quick and you could win a utility backpac...
MSVC ARM64 Optimizations in Visual Studio 2022 17.7
In Visual Studio 2022 version 17.6 we added a host of new ARM64 optimizations. In this 2nd edition of our blog, we will highlight some of the performance improvements to MSVC ARM64 compiler backend, we will discuss key optimizations in the Visual Studio 2022 version 17.7 for both scalar ISA and SIMD ISA (NEON). We started introducing these performance optimizations in 17.6 release and we have landed them in 17.7 release. By element operation ARM64 supports by-element operation in several instructions such as , , , etc. This feature allows a SIMD operand to be computed directly by a SIMD element using an index ...
C11 Threads in Visual Studio 2022 version 17.8 Preview 2
Back in Visual Studio 2022 version 17.5 Microsoft Visual C gained preliminary support for C11 atomics. We are happy to announce that support for the other major concurrency feature of C11, threads, is available in Visual Studio version 17.8 Preview 2. This should make it easier to port cross-platform C applications to Windows, without having to drag along a threading compatibility layer. Unlike C11 atomics, C11 threads do not share an ABI with C++’s facilities, but C++ programs can include the C11 threads header and call the functions just like any C program. Both are implemented in terms of the primitives pr...
MSVC Machine-Independent Optimizations in Visual Studio 2022 17.7
This blog post presents a selection of machine-independent optimizations that were added between Visual Studio versions 17.4 (released November 8, 2022) and 17.7 P3 (released July 11, 2023). Each optimization below shows assembly code for both X64 and ARM64 to show the machine-independent nature of the optimization. Optimizing Memory Across Block Boundaries When a small struct is loaded into a register, we can optimize field accesses to extract the correct bits from the register instead of accessing it through memory. Historically in MSVC, this optimization has been limited to memory accesses within the same ba...
Enhancing the CMake Targets View in Visual Studio
The CMake Targets View in Visual Studio is a view that allows you to visualize your CMake project structure by the CMake targets and build specified target libraries and executables. To make this view more usable, we have implemented a few new improvements to make it easier than ever to navigate your CMake targets. This includes improved navigation to the CMake Targets View, a new, more simplified CMake Targets View, and the ability to exclude specified CMake items from the Targets View. Additionally, we have future planned work in the near-term to allow users to customize this view to their desired configuration...
What’s New for the Remote File Explorer in Visual Studio
The Remote File Explorer gives you the capability to access your files and folders on your remote machines that you are connected to through the Connection Manager in Visual Studio, without having to leave the IDE. Since we last spoke, the team has implemented new features to further enhance your remote file workflows by listening to your direct feedback. Download the latest preview version of Visual Studio to access the new updates for the Remote File Explorer and give it a try. Background To access the Remote File Explorer, navigate to View > Remote File Explorer after downloading through the Linux and Em...
Make Member Function const and Global Function Static in Visual Studio
We are delighted to announce that Visual Studio Preview now includes the "Make Member Function Const" and "Make Global Function Static" features. To check out these features, make sure you update to the latest version of Visual Studio Preview. Make Member Function Const Visual Studio now generates hints to mark member functions as when a member function doesn't modify the object's state. This feature identifies cases where a member function performs actions that could be accomplished through the object's public interface using a const pointer. We have made this process easier for you by adding a sugges...
Integrating C++ header units into Office using MSVC (2/n)
In this follow-up blog, we will explore progress made towards getting header units working in the Office codebase. Overview Overview Last time we talked about how and why header units can be integrated into a large cross-platform codebase like Office. We discussed how header units helped surface conformance issues (good) and expose and fix compiler bugs (good-ish). We talked about how we went about taking "baby steps" to integrate header units into smaller liblets—we're talking something on the order of 100s of header units. This blog entry is all about scale and how we mov...
MSVC Address Sanitizer – One DLL for all Runtime Configurations
With Visual Studio 2022 version 17.7 Preview 3, we have refactored the MSVC Address Sanitizer (ASan) to depend on one runtime DLL regardless of the runtime configuration. This simplifies project onboarding and supports more scenarios, particularly for projects statically linked (, ) to the C Runtimes. However, static configurations have a new dependency on the ASan runtime DLL. Summary of the changes: Motivation and Effects When building a project, you must specify how you want to link to the C and C++ Runtime Libraries. Using the option will link dynamically to the runtimes and have...