C++ Team Blog

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

GSL 3.0.0 Release
GSL 3.0.0 Release
Update June 4th, 2020 - GSL version 3.1.0 has been released. Please see the latest release page for information regarding GSL 3.1.0. For all future updates, please see refer to the release page on GitHub.   GSL 3.0.0 Release Version 3.0.0 of Microsoft's implementation of the C++ Core Guidelines Support Library (GSL) is now available
MSVC Backend Updates in Visual Studio 2019 Version 16.5
MSVC Backend Updates in Visual Studio 2019 Version 16.5
In Visual Studio 2019 version 16.5 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and better security. Here is a brief list of improvements for you to review. Do you want to experience the new improvements of the C++ bac
Porting a C++/CLI Project to .NET Core
Porting a C++/CLI Project to .NET Core
One of the new features of Visual Studio 2019 (beginning with version 16.4) and .NET Core 3.1 is the ability to build C++/CLI projects targeting .NET Core. This can be done either directly with cl.exe and link.exe (using the new /clr:netcore option) or via MSBuild (using <CLRSupport>NetCore</CLRSupport>). In this post, I'll walk th
Announcing full support for a C/C++ conformant preprocessor in MSVC
Announcing full support for a C/C++ conformant preprocessor in MSVC
We are excited to announce full support for a conformant preprocessor in the MSVC toolset starting with Visual Studio 2019 version 16.6 Preview 2. Since the original blog post announcing preprocessor conformance changes, we’ve come a long way and are now ready to announce the completion of the C/C++ conformant preprocessor and its move to
Doxygen and XML Doc Comment support
Doxygen and XML Doc Comment support
Whether you’re using Doxygen or XML Doc Comments, Visual Studio version 16.6 Preview 2 provides automatic comment stub generation as well as Quick Info, Parameter Help, and Member List tooltip support. Stub Generation By default, the stub generation is set to XML Doc Comments. The comment stub can be generated by typing a triple slash (///
IntelliSense Code Linter for C++
IntelliSense Code Linter for C++
Introducing the IntelliSense Code Linter for C++; a preview of "as-you-type" code analysis with fixups. Try it out today in Visual Studio 2019 16.6 Preview 2.
More Spectre Mitigations in MSVC
More Spectre Mitigations in MSVC
In a previous blog post, Microsoft described the Spectre mitigations available under /Qspectre. These mitigations, while not significantly impacting performance, do not protect against all possible speculative load attacks, described in industry research as Load Value Injection. We are now adding two new switches /Qspectre-load and /Qspectre-l
Analyze your builds programmatically with the C++ Build Insights SDK
Analyze your builds programmatically with the C++ Build Insights SDK
We're happy to announce today the release of the C++ Build Insights SDK, a framework that gives you access to MSVC build time information via C and C++ APIs. To accompany this release, we are making vcperf open source on GitHub. Because vcperf itself is built with the SDK, you can use it as a reference when developing your own tools. We’re e
The Performance Benefits of Final Classes
The Performance Benefits of Final Classes
The final specifier in C++ marks a class or virtual member function as one which cannot be derived from or overriden. For example, consider the following code:  If we attempt to write a new class which derives from `derived` then we get a compiler error:  The final specifier is useful for expressing to readers of the code that a clas