C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

Aug 13, 2019
Post comments count 2
Post likes count 0

New C++ Core Check Rules

Jordan Maples

The C++ Core Guidelines Checker receives three new rules with the release of Visual Studio version 16.3 Preview 2. In addition, some warnings published in the warnings.h that ships with Visual Studio have been moved or renamed. Below is a quick summary of these additions. For more detailed information, please see the C++ Core Guidelines Checker Reference documentation. If you’re just getting started with native code analysis tools, take a look at our introductory quick start for Code Analysis for C/C++. New rule set The "Enum Rules" set has been added in this release. It can be enabled by selecting "C++ C...

Aug 13, 2019
Post comments count 1
Post likes count 0

Side-by-side Minor Version MSVC Toolsets in Visual Studio 2019

Will Buik

Visual Studio 2019 version 16.1 Preview 3 ships with the first side-by-side minor versions of the v142 MSVC toolset. We first shipped minor side-by-side versions of MSVC toolsets with Visual Studio 2017, but a few things have changed in 2019. This post covers what’s new; primarily more granular versions of the toolsets in the installer and support for CMake projects. For those not familiar with these minor version MSVC toolsets, I recommend checking out our previous post about minor side-by-side toolsets. It includes many more details about when and how you should use this feature. In general, you should not n...

Aug 8, 2019
Post comments count 2
Post likes count 0

Game performance improvements in Visual Studio 2019 version 16.2

Natalia Glagoleva

This spring Gratian Lup described in his blog post the improvements for C++ game development in Visual Studio 2019. From Visual Studio 2019 version 16.0 to Visual Studio 2019 version 16.2 we’ve made some more improvements. On the Infiltrator Demo we’ve got 2–3% performance wins for the most CPU-intensive parts of the game. Throughput A huge throughput improvement was done in the linker! Check our recent blogpost on Improved Linker Fundamentals in Visual Studio 2019. New Optimizations A comprehensive list of new and improved C++ compiler optimizations can be found in a recent blogpost on MSVC Backend Updates i...

Jul 30, 2019
Post comments count 5
Post likes count 0

Improving the Performance of Standard Library Functions

Kirsten Lee

In Visual Studio 2019 version 16.2 we improved the codegen of several standard library functions. Guided by your feedback on Developer Community (Inlining std::lldiv and Improved codegen for std::fmin, std::fmax, std::round, std::trunc) we focused on the variants of standard division (, , ) and . Originally function calls to the standard library, rather than inline assembly instructions, were generated upon each invocation of variations of and , regardless of the compiler optimization flags passed. Since these standard library function definitions live inside of the runtime, their definitions are opaque to th...

Jul 29, 2019
Post comments count 2
Post likes count 0

Smarter Member List Filtering for C++ 

Nick Uhlenhuth

We are always looking for ways to make you more productive while coding in Visual Studio. In Visual Studio 2019 version 16.2, we have created a smarter, more relevant Member List. Specifically, we now apply method filtering based on type qualifiers. To illustrate this, consider the following example:  You have two vectors, but one is . When we invoke the member list on the non-const vector, we see the option for . However, when we invoke the member list on the const vector, Visual Studio now knows not to display any non-const members on a const object:    Even More Filtering  If you wish to benefit furthe...

Jul 25, 2019
Post comments count 3
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 version 16.2

Daniel Donenfeld

In Visual Studio 2019 version 16.2 we continue to improve the C++ backend with build throughput improvements and new and improved optimizations. These build on top of our MSVC backend improvements in Visual Studio 2019 version 16.0 which we previously announced. We will be following up on many of the improvements here with their own blog posts. Build Throughput Improvements New and Improved Optimizations Inliner Improvements Improved Code Generation and Optimization of Intrinsics Vectorizer Improvements New Analysis Passes General Optimizer Impr...

Jul 25, 2019
Post comments count 11
Post likes count 0

Improved Linker Fundamentals in Visual Studio 2019

Russell Hadley

On the C++ team we’ve heard loud and clear from users that build times are a pain point. We’ve continued our focus on improving the step, linking, that dominates F5 build times. Fast F5 build times, or iteration build times, are a key contributor to developer productivity and we felt that there was a large opportunity so we narrowed in on changes that we felt could move the needle 2x or more. This is on top of the significant improvements we made to the tool chain to speed up link times in the Visual Studio 2019 version 16.0 release. Let me give a teaser of the kinds of wins we were able to achieve.  ...

Jul 24, 2019
Post comments count 1
Post likes count 0

Visual Studio Code C/C++ Extension: July 2019 Update

Tara Raj

The July 2019 update of the Visual Studio Code C/C++ extension is now available. This release includes many new features, including semantic colorization and improvements to the IntelliSense Configuration Settings Editor UI and IntelliSense cache. For a full list of this release’s improvements, check out our release notes on GitHub. Semantic Colorization Semantic colorization support has been one of the top asks on our GitHub repo for the past few years. We faced many challenges in creating support for semantic colorization for the C/C++ extension since there is no VS Code API for semantic source highlighting a...

Jul 24, 2019
Post comments count 3
Post likes count 0

Inlining Decisions in Visual Studio

Terry Mahaffey

Introduction My name is Terry Mahaffey and I work on the code generation team in MSVC. Lately I’ve been doing some work on our inliner and I wanted to give a brief introduction to it before later diving into some of the changes we’ll be shipping. Inlining is perhaps the most important optimization a compiler performs. In addition to removing call overhead, an inline decision is most useful when it exposes additional optimization opportunities not present in either the caller or callee by themselves. For example: It is a really good idea to inline bar into foo in this example; once that is done the compiler...