C++ Team Blog

C++ tutorials, C and C++ news, and information about Visual Studio, Visual Studio Code, and Vcpkg from the Microsoft C++ team.

Build Throughput Series: More Efficient Template Metaprogramming
Build Throughput Series: More Efficient Template Metaprogramming
In the previous blog post I shared how template specialization and template instantiation are processed in the MSVC compiler. We will now look at some examples from real-world code bases to show some ways to reduce the number of them. Example 1 This example is extracted from our own MSVC compiler code base. The code tries to apply several ...
C++ with Visual Studio and WSL2
C++ with Visual Studio and WSL2
Our team released native support for C++ with the Windows Subsystem for Linux (WSL) in Visual Studio in 2019. “Native support” means that all commands are executed locally instead of over a SSH connection. Since then, WSL2 has been announced and we’ve received questions about our support for WSL2 in Visual Studio. The purpose of this ...
Build Throughput Series: Template Metaprogramming Fundamentals
Build Throughput Series: Template Metaprogramming Fundamentals
Template metaprogramming is popular and seen in many code bases. However, it often contributes to long compile times. When investigating build throughput improvement opportunities in large codebases, our finding is that more than one million template specializations and template instantiations is quite common and often provides optimization ...
Faster C++ Iteration Builds
Faster C++ Iteration Builds
We made improvements to C++ link time earlier in Visual Studio 2019, and we have more improvements to tell you about. As of version 16.7, we measure up to 5X improvement in some incremental linking and debugging scenarios and up to a 1.5X speedup in full linking. These represent some of the improvements The Coalition saw in their recent ...
Configure IntelliSense with CMake Toolchain Files in Visual Studio 2019 16.9 Preview 2
Configure IntelliSense with CMake Toolchain Files in Visual Studio 2019 16.9 Preview 2
Visual Studio can now configure IntelliSense in CMake projects based on the value of CMake variables set by CMake toolchain files. These improvements provide automatic IntelliSense configuration when a CMake toolchain file is used for configuration and build. For example, Visual Studio can now provide IntelliSense for CMake projects using an ...
Visual Studio Code C++ Extension: ARM and ARM64 support
Visual Studio Code C++ Extension: ARM and ARM64 support
The latest release of the Visual Studio Code C++ extension brings C++ IntelliSense and build support for Windows ARM64, Linux ARM and Linux ARM64 architectures. What’s more, you can download VS Code builds for ARM and ARM64 architectures, meaning you can officially use VS Code and the C++ extension on a Raspberry Pi, Chromebook, Surface Pro ...
Conditionally Trivial Special Member Functions
Conditionally Trivial Special Member Functions
The C++ standards committee is currently focusing on adding features to the language which can simplify code. One small example of this in C++20 is conditionally trivial special member functions, which we added support for in Visual Studio 2019 version 16.8. Its benefit isn’t immediately obvious unless you’ve been deep down the rabbit hole...
C++20 Features in Visual Studio 2019 versions 16.7 and 16.8
C++20 Features in Visual Studio 2019 versions 16.7 and 16.8
What’s New We have continued our efforts to implement C++20 in the MSVC toolset, with noteworthy progress being made in VS (Visual Studio) 2019 v16.7 and VS 2019 v16.8. This blog post lists the features implemented since the C++20 Features and Fixes in VS 2019 16.1 through 16.6 blog post. This blog post will specifically focus on...
A Tour of C++ Modules in Visual Studio
A Tour of C++ Modules in Visual Studio
C++ module support has arrived in Visual Studio! Grab the latest Visual Studio Preview if you want to try it out. C++ modules can help you compartmentalize your code, speed up build times, and they work seamlessly, side-by-side with your existing code. This preview only supports C++ modules in the IDE for MSBuild projects. While the MSVC ...