C++ Team Blog
C++ tutorials, C and C++ news, and information about Visual Studio, Visual Studio Code, and Vcpkg from the Microsoft C++ team.
Microsoft C++ Team At CppCon 2019: Videos Available
Sy BrandOctober 30, 2019Oct 30, 201910/30/19
Last month a large contingent from the Microsoft C++ team attended CppCon. We gave fourteen presentations covering our tools, developments in the standard, concepts which underlie the work we do, and more.
We also recorded an episode of CppCast with Microsoft MVPs Rob Irving and Jason Turner.
AddressSanitizer (ASan) for Windows with MSVC
Augustin PopaOctober 23, 2019Oct 23, 201910/23/19
We are pleased to announce AddressSanitizer (ASan) support for the MSVC toolset. ASan is a fast memory error detector that can find runtime memory issues such as use-after-free and perform out of bounds checks. Support for sanitizers has been one of our more popular suggestions on Developer Community,
Usability Improvements for CMake in Visual Studio 2019 version 16.4: Launch Target Selection and Overview Pages
Erika SweetOctober 15, 2019Oct 15, 201910/15/19
We hear your feedback, and in Visual Studio 2019 version 16.4 Preview 2 we have addressed one of our top Developer Community issues related to CMake development in Visual Studio by revamping the selection of CMake launch targets. We have also added Overview Pages for CMake to help you get started with CMake and cross-platform development.
Code analysis with clang-tidy in Visual Studio
eli fesslerOctober 8, 2019Oct 8, 201910/8/19
[Updated on 11/6/2019] – Removed "Setup: Installing Clang tools" section; this is no longer required starting in Visual Studio 2019 version 16.4 Preview 3.
Visual Studio 2019 version 16.4 Preview 1 brings a significant improvement to the C++ code analysis experience: native support for clang-tidy,
C++20's Conditionally Explicit Constructors
Sy BrandOctober 1, 2019Oct 1, 201910/1/19
explicit(bool) is a C++20 feature for simplifying the implementation of generic types and improving compile-time performance.
In C++ it is common to write and use types which wrap objects of other types. std::pair and std::optional are two examples, but there are plenty of others in the standard library,
Microsoft C++ Team on CppCast
Sy BrandSeptember 30, 2019Sep 30, 201909/30/19
Today we have a short guest post from Rob Irving, host of CppCast to tell us about an episode he recorded with our team.
During CppCon 2019 the hosts of CppCast had a chance to sit down with Marian Luparu,
The Future of C++/CLI and .NET Core 3
Will BuikSeptember 23, 2019Sep 23, 201909/23/19
.NET Core 3.0 is now available and we have received a lot of questions about what that means for the future of C++/CLI. First, we would like to let everyone know that we are committed to supporting C++/CLI for .NET Core to enable easy interop between C++ codebases and .NET technologies such as WPF and Windows Forms.
Open Sourcing MSVC's STL
Stephan T. Lavavej - MSFTSeptember 16, 2019Sep 16, 201909/16/19
Today at CppCon 2019, we (the MSVC team) announced that we're releasing our implementation of the C++ Standard Library (also known as the STL) as open source.
https://github.com/microsoft/STL is our new repository, containing all of our product source code, a new CMake build system,
C++20 Concepts Are Here in Visual Studio 2019 version 16.3
xiangfanSeptember 10, 2019Sep 10, 201909/10/19
C++20 Concepts are now available for the first time in Visual Studio 2019 version 16.3 Preview 2. This includes both the compiler and standard library support, but not the intellisense support.
Microsoft C++ Team at CppCon 2019
Sy BrandSeptember 6, 2019Sep 6, 201909/6/19
The Microsoft C++ team will have a booth and many talks covering a wide range of topics at CppCon 2019. Come say hi to our team outside Aurora D and attend our talks to learn what's new in our tooling, dive into new features in the standard,
C++ Inliner Improvements: The Zipliner
David HartglassJanuary 7, 2020Jan 7, 202001/7/20
Visual Studio 2019 versions 16.3 and 16.4 include improvements to the C++ inliner. Among these is the ability to inline some routines after they have been optimized, referred to as the "Zipliner." Depending on your application, you may see some minor code quality improvements and/or major build-time (compiler throughput) improvements.
CMake Tools Extension for Visual Studio Code
Erika SweetNovember 21, 2019Nov 21, 201911/21/19
Microsoft is now the primary maintainer of the CMake Tools extension for Visual Studio Code. The extension was created and previously maintained by vector-of-bool, who has moved on to other things. Thank you vector-of-bool for all of your hard work getting this extension to where it is today!
EA and Visual Studio's Linux Support
Erika SweetNovember 7, 2019Nov 7, 201911/7/19
EA is using Visual Studio's cross-platform support to cross-compile on Windows and debug on Linux. The following post is written by Ben May, a Senior Software Engineer of Engineering Workflows at EA. Thanks Ben and EA for your partnership, and for helping us make Visual Studio the best IDE for C++ cross-platform development.
Introducing C++ Build Insights
Kevin CadieuxNovember 5, 2019Nov 5, 201911/5/19
C++ builds should always be faster. In Visual Studio 2019 16.2, we've shown our commitment to this ideal by speeding up the linker significantly. Today, we are thrilled to announce a new collection of tools that will give you the power to make improvements of your own.
Visual Studio Code C++ extension: Nov 2019 update
Marian Luparu [MSFT]November 4, 2019Nov 4, 201911/4/19
Find All References, Rename Symbol refactoring, support for localization, new navigation breadcrumb controls, and improvements to the Outline view are only a few of the improvements in the November 2019 update of Visual Studio Code C++ extension.
An Update on C++/CLI and .NET Core
Will BuikNovember 1, 2019Nov 1, 201911/1/19
The first public release of our C++/CLI support for .NET Core 3.1 is now available for public preview! It is included in Visual Studio 2019 update 16.4 Preview 2. We would love it if you could try it out and send us any feedback you have.
C++ Q&A Series
Simplify Your Code With Rocket Science: C++20's Spaceship Operator
Cameron DaCamaraJune 27, 2019Jun 27, 201906/27/19
This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library,
Guaranteed Copy Elision Does Not Elide Copies
Sy BrandDecember 11, 2018Dec 11, 201812/11/18
This post is also available on Simon Brand's blog
C++17 merged in a paper called Guaranteed copy elision through simplified value categories. The changes mandate that no copies or moves take place in some situations where they were previously allowed, e.g.:
struct non_moveable { non_moveable() = default; non_moveable(non_moveable&&) = delete; }; non_moveable make() { return {}; } non_moveable x = make(); //compiles in C++17, error in C++11/14
struct non_moveable {
non_moveable() = default;
non_moveable(non_moveable&&) = delete;
non_moveable make() { return {}; }
non_moveable x = make(); //compiles in C++17, error in C++11/14
You can see this behavior in compiler versions Visual Studio 2017 15.6,
Clang/LLVM Support in Visual Studio
Will BuikApril 24, 2019Apr 24, 201904/24/19
Visual Studio 2019 version 16.1 Preview 2 comes with support for Clang/LLVM out-of-the-box. Visual Studio has had great tooling for MSVC and GCC for quite a while now. The latest preview brings Clang into the fold.
Visual Studio 2019 includes out of the box support for editing,
Visual Studio CMake Support – Clang/LLVM, CMake 3.14, Vcpkg, and Performance Improvements
We've introduced a bunch of improvements to our CMake support in the latest preview of Visual Studio 2019 Update 1. The latest release includes Clang/LLVM support, CMake 3.14, better vcpkg integration, and many more enhancements. If you are not familiar with Visual Studio's CMake support, check out how to get started.
Exploring Clang Tooling Part 3: Rewriting Code with clang-tidy
Stephen KellyNovember 6, 2018Nov 6, 201811/6/18
In the previous post in this series, we used clang-query to examine the Abstract Syntax Tree of a simple source code file. Using clang-query, we can prototype an AST Matcher which we can use in a clang-tidy check to refactor code in bulk.
Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query
Stephen KellyOctober 23, 2018Oct 23, 201810/23/18
This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee,
Exploring Clang Tooling Part 1: Extending Clang-Tidy
Exploring Clang Tooling, Part 0: Building Your Code with Clang
Stephen KellySeptember 18, 2018Sep 18, 201809/18/18
Improvements to Accuracy and Performance of Linux IntelliSense
Erika SweetJanuary 10, 2020Jan 10, 202001/10/20
This blog post was written by Paul Maybee, a Principal Software Engineer on the C++ Cross-Platform Team.
Accurate C++ IntelliSense requires access to the C++ headers that are referenced by C++ source files. For Linux scenarios the headers referenced by a Linux MSBuild or CMake project are copied to Windows by Visual Studio from the Linux device (or VM,
Debugging Linux CMake Projects with gdbserver
Erika SweetDecember 18, 2019Dec 18, 201912/18/19
Gdbserver is a program that allows you to remotely debug applications running on Linux. It is especially useful in embedded scenarios where your target system may not have the resources to run the full gdb.
Visual Studio 2019 version 16.5 Preview 1 enables remote debugging of CMake projects with gdbserver.
Build C++ Applications in a Linux Docker Container with Visual Studio
Docker containers provide a consistent development environment for building, testing, and deployment. The virtualized OS, file system, environment settings, libraries, and other dependencies are all encapsulated and shipped as one image that can be shared between developers and machines. This is especially useful for C++ cross-platform developers because you can target a container that runs a different operating system than the one on your development machine.
Set Environment Variables for Debug, Launch, and Tools with CMake and Open Folder
Will BuikNovember 18, 2019Nov 18, 201911/18/19
There are many reasons why you may want to customize environment variables. Many build systems use environment variables to drive behavior; debug targets sometimes need to have PATH customized to ensure their dependencies are found; etc. Visual Studio has a mechanism to customize environment variables for debugging and building CMake projects and C++ Open Folder.
C++ Cross-Platform Development with Visual Studio 2019 version 16.3: vcpkg, CMake configuration, remote headers, and WSL
Erika SweetAugust 16, 2019Aug 16, 201908/16/19
In Visual Studio 2019 you can target both Windows and Linux from the comfort of a single IDE. Visual Studio's native support for CMake lets you open any folder containing C++ code and a CMakeLists.txt file directly in Visual Studio to edit,
Linux Development with C++ in Visual Studio 2019: WSL, ASan for Linux, Separation of Build and Debug
Erika SweetMay 10, 2019May 10, 201905/10/19
In Visual Studio 2019 you can target both Windows and Linux from the comfort of a single IDE. In Visual Studio 2019 version 16.1 Preview 3 we announced several new features specific to the Linux Workload: native support for the Windows Subsystem for Linux (WSL),
AddressSanitizer (ASan) for the Linux Workload in Visual Studio 2019
Erika SweetMay 8, 2019May 8, 201905/8/19
In Visual Studio 2019 version 16.1 Preview 3 we have integrated AddressSanitizer (ASan) into Visual Studio for Linux projects. ASan is a runtime memory error detector for C/C++ that catches the following errors:
Use after free (dangling pointer reference)
Heap buffer overflow
Stack buffer overflow
Use after return
Use after scope
Initialization order bugs
You can enable ASan for MSBuild-based Linux projects and CMake projects that target a remote Linux system or WSL (Windows Subsystem for Linux).
Using multi-stage containers for C++ development
Marc GoodnerDecember 13, 2018Dec 13, 201812/13/18
Updated January 10, 2020: Corrected link to article source that was broken by refactoring in the repo.
Containers are a great tool for configuring reproducible build environments. It's fairly easy to find Dockerfiles that provide various C++ environments. Unfortunately, it is hard to find guidance on how to use newer techniques like multi-stage builds.
C++ development with Docker containers in Visual Studio Code
Rong LuAugust 14, 2018Aug 14, 201808/14/18
Containers allow developers to package up an application with all the parts it needs, such as libraries and other dependencies, and ship it all out as one image. This is especially useful for C++ cross-platform development – with containers you can choose to target a platform that runs on a completely different operating system than your developer machine.
Using MSVC in a Docker Container for Your C++ Projects
Marc GoodnerAugust 13, 2018Aug 13, 201808/13/18
Containers encapsulate the runtime environment of an application: the file system, environment settings, and virtualized OS are bundled into a package. Docker containers have changed the way we think about build and test environments since they were introduced five years ago.
Coroutine
Using C++ Resumable Functions with Libuv
Jim SpringfieldFebruary 2, 2017Feb 2, 201702/2/17
Previously on this blog we have talked about Resumable Functions, and even recently we touched on the renaming of the yield keyword to co_yield in our implementation in Visual Studio 2017. I am very excited about this potential C++ standards feature,
`yield` keyword to become `co_yield` in VS 2017
EricMitteletteJanuary 27, 2017Jan 27, 201701/27/17
Coroutines—formerly known as "C++ resumable functions"—are one of the Technical Specifications (TS) that we have implemented in the Visual C++ compiler. We've supported coroutines for three years—ever since the VC++ November 2013 CTP release.
If you're using coroutines you should be aware that the keyword yield is being removed in the release of VS 2017.
Using C++ Coroutines to simplify async UWP code
EricMitteletteApril 4, 2016Apr 4, 201604/4/16
The Universal Windows Platform (UWP) introduced many async APIs; there are now almost 1700 of them. In fact, the team switched every API that could take 50ms or more to complete to async mode.
Coding with the async pattern is not an easy task,
Build and Debug MySQL on Linux with Visual Studio 2019
The MySQL Server Team recently shared on their blog how to use Visual Studio 2019 to edit, build, and debug MySQL on a remote Linux server. This leverages Visual Studio's native support for CMake and allows them to use Visual Studio as a front-end while outsourcing all the "heavy lifting" (compilation,
Vcpkg: 2019.07 Update
Tara RajAugust 15, 2019Aug 15, 201908/15/19
The 2019.07 update of vcpkg, a tool that helps you manage C and C++ libraries on Windows, Linux, and macOS, is now available. This update is a summary of the new functionality and improvements made to vcpkg over the past month.
Productivity Improvements for C++: New Default Colorization, Template Argument Filtering in Call Stack Window, and IntelliCode On-By-Default
Nick UhlenhuthAugust 14, 2019Aug 14, 201908/14/19
New Default Semantic Colorization
In Visual Studio 2019 version 16.3 Preview 2 we've introduced a new default semantic colorization scheme for C++. For a long time, many of the default colors were simply black. However, colorization can help you quickly understand the structure of code at a glance.
New C++ Core Check Rules
Jordan MaplesAugust 13, 2019Aug 13, 201908/13/19
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.
Visual Studio Code C/C++ Extension: July 2019 Update
Tara RajJuly 24, 2019Jul 24, 201907/24/19
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,
Step Back – Going Back in C++ Time
Andy SterlandSeptember 26, 2018Sep 26, 201809/26/18
Step Back for C++
In the most recent, 15.9, update to Visual Studio 2017 Enterprise Edition, we've added "Step Back" for C++ developers targeting Windows 10 Anniversary Update (1607) and later. With this feature, you can now return to a previous state while debugging without having to restart the entire process.
C++ Core Checks in Visual Studio 2017 15.7 Preview 2
Sunny ChatterjeeMarch 22, 2018Mar 22, 201803/22/18
This post was written by Sergiy Oryekhov.
The C++ Core Guidelines Check extension received several new rules in Visual Studio 2017 15.7 Preview 2. The primary focus in this iteration was on the checks that would make it easier to adopt utilities from the Guidelines Support Library.
C++ Code Analysis Improvements for Visual Studio 2017 15.7 Preview 1
Kyle ReedMarch 13, 2018Mar 13, 201803/13/18
点这里看中文版
We're making it easier to configure and use the C++ code analysis features with a set of changes targeting 15.7. In the first 15.7 preview we've cleaned up the UI, fixed our documentation links and, most importantly, simplified the way analysis extensions are configured.
Arithmetic overflow checks in C++ Core Check
Sunny ChatterjeeFebruary 23, 2018Feb 23, 201802/23/18
We've improved the C++ Code Analysis toolset with every major compiler update in Visual Studio 2017. Version 15.6, now in Preview, includes a set of arithmetic overflow checks. This article discusses those checks and why you'll want to enable them in your code.
Image Watch is now available for Visual Studio 2017
Marian Luparu [MSFT]December 14, 2017Dec 14, 201712/14/17
Image Watch is a Visual Studio extension that provides a watch window for viewing in-memory bitmaps when debugging native C++ code. It comes with built-in support for OpenCV image types (e.g. cv::Mat, cv::Mat_<> , etc.).
We know that, for many of you,
Broken Warnings Theory
Yuriy SolodkyyDecember 13, 2017Dec 13, 201712/13/17
Перевод статьи на русском
The "broken warnings theory" is a fictional theory of the norm-setting and signaling effect of coding practices and bug-checking techniques in 3rd party libraries on new bugs and design anti-patterns. The theory states that maintaining and monitoring warning levels to prevent small problems such as "signed/unsigned mismatch",
Diagnostic Improvements in Visual Studio 2017 15.3.0
Yuriy SolodkyyJuly 21, 2017Jul 21, 201707/21/17
This post as well as described diagnostics significantly benefited from the feedback by Mark, Xiang, Stephan, Marian, Gabriel, Ulzii, Steve and Andrew.
Visual Studio 2017 15.3.0 release comes with a number of improvements to the Microsoft Visual C++ compiler's diagnostics. Most of these improvements are in response to the diagnostics improvements survey we shared with you at the beginning of the 15.3 development cycle.
Side-by-side Minor Version MSVC Toolsets in Visual Studio 2019
Will BuikAugust 13, 2019Aug 13, 201908/13/19
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;
Using Visual Studio for Cross Platform C++ Development Targeting Windows and Linux
Marc GoodnerNovember 26, 2018Nov 26, 201811/26/18
A great strength of C++ is the ability to target multiple platforms without sacrificing performance. If you are using the same codebase for multiple targets, then CMake is the most common solution for building your software. You can use Visual Studio for your C++ cross platform development when using CMake without needing to create or generate Visual Studio projects.
STL Features and Fixes in VS 2017 15.8
Billy.OnealSeptember 18, 2018Sep 18, 201809/18/18
15.7 was our first feature complete C++17 library (except floating-point <charconv>), and in 15.8 we have addressed large numbers of outstanding bugs. As usual, we've maintained a detailed list of the STL fixes that are available. Visual Studio 2017 15.8 is available at https://visualstudio.microsoft.com/vs/.
Using C++17 Parallel Algorithms for Better Performance
Shared PCH usage sample in Visual Studio
EricMitteletteJuly 5, 2018Jul 5, 201807/5/18
This post was written by Olga Arkhipova and Xiang Fan
Oftentimes, multiple projects in a Visual Studio solution use the same (or very similar) precompiled headers. As pch files are often big and building them takes a significant amount of time,
Configuring C++ IntelliSense and Browsing
Oleg KharitonovMarch 27, 2018Mar 27, 201803/27/18
Whether you are creating a new (or modifying an existing) C++ project using a Wizard, or importing an project into Visual Studio from another IDE, it's important to configure the project correctly for the IntelliSense and Browsing features to provide accurate information.
Continuous Integration for C++ with Visual Studio Team Services
BryanDiLauraFebruary 17, 2017Feb 17, 201702/17/17
Visual Studio Team Services (VSTS) is an easy way to help your team manage code and stay connected when developing. VSTS supports continuous integration using a shared code repository that everyone on the team uses to check in code changes. Every time any code is checked in,
Targeting the Windows Subsystem for Linux from Visual Studio
Marc GoodnerFebruary 8, 2017Feb 8, 201702/8/17
Update Jan. 8, 2020: Visual Studio 2019 version 16.1 and later has native support for WSL. This eliminates the need to establish an SSH connection and is the recommended workflow for building and debugging on WSL.
The Windows Subsystem for Linux (WSL) was first introduced at Build in 2016 and was delivered as an early beta in Windows 10 Anniversary Update.
Visual C++ docs: the future is… soon!
EricMitteletteNovember 8, 2016Nov 8, 201611/8/16
We on the Visual C++ documentation team are pleased to announce some changes to the API reference content in the following Visual C++ libraries: STL, MFC, ATL, AMP, and ConcRT.
Since the beginning of MSDN online, the Visual C++ libraries have documented each class member,
Smarter Member List Filtering for C++
Nick UhlenhuthJuly 29, 2019Jul 29, 201907/29/19
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.
New Code Analysis Checks in Visual Studio 2019: use-after-move and coroutine
Sunny ChatterjeeJanuary 28, 2019Jan 28, 201901/28/19
Visual Studio 2019 Preview 2 is an exciting release for the C++ code analysis team. In this release, we shipped a new set of experimental rules that help you catch bugs in your codebase, namely: use-after-move and coroutine checks. This article provides an overview of the new rules and how you can enable them in your project.
MSVC Preprocessor Progress towards Conformance
Ulzii Luvsanbat [MSFT]July 6, 2018Jul 6, 201807/6/18
Why re-write the preprocessor?
Recently, we published a blog post on C++ conformance completion. As mentioned in the blog post, the preprocessor in MSVC is currently getting an overhaul. We are doing this to improve its language conformance, address some of the longstanding bugs that were difficult to fix due to its design and improve its usability and diagnostics.
New, experimental code analysis features in Visual Studio 2017 15.8 Preview 3
eli fesslerJune 26, 2018Jun 26, 201806/26/18
The Visual C++ team has been working to refresh our code analysis experience inside Visual Studio. We're aiming to make these tools both more useful and natural to use and hope that they'll benefit you no matter your workflow, style, or project type.
Precompiled Header (PCH) issues and recommendations
Ulzii Luvsanbat [MSFT]July 13, 2017Jul 13, 201707/13/17
This post written by Mark Hall, Xiang Fan, Yuriy Solodkyy, Bat-Ulzii Luvsanbat, and Andrew Pardoe.
Precompiled headers can reduce your compilation times significantly. They've worked reliably for millions of developers since they were introduced 25 years ago to speed up builds of MFC apps.
Clang 3.8 in the May release of Clang with Microsoft CodeGen
Yuriy SolodkyyJune 3, 2016Jun 3, 201606/3/16
This blog post written by Dave Bartolomeo, Yuriy Solodkyy, and Andrew Pardoe
We have just released our fifth out-of-band update of Clang/C2 toolset. As always, this release has been driven by your feedback. While we've heard a lot of feature requests the one's we've heard most frequently are that you want Clang 3.8 and you want x64-hosted compilers.
Clang/C2: We need your advice!
Andrew PardoeApril 6, 2016Apr 6, 201604/6/16
The Visual C++ team has shipped three releases of Clang with Microsoft CodeGen (Clang/C2). We've got a solid pre-production compiler that passes all of our STL tests and compiles a bunch of code into native Windows binaries. We've about to move to the 3.8 release of clang.
Clang with Microsoft CodeGen (January 2016) released
Andrew PardoeJanuary 20, 2016Jan 20, 201601/20/16
We have just released an out-of-band update of Clang/C2 toolset that brings in some of the community fixes as well as bugs found from testing. This is one of many rapid releases to come in the future, and issues reported from customers will be addressed progressively.
Visual Studio 2015 Update 1: New Experimental Feature – MPX
Yuriy SolodkyyJanuary 20, 2016Jan 20, 201601/20/16
This post is about Intel® Memory Protection Extensions (Intel® MPX) support in Microsoft Visual Studio* 2015; content provided by Gautham Beeraka, George Kuan, and Juan Rodriguez from Intel Corporation.
Update 1 for Visual Studio 2015 was announced on November 30, 2015.
Improved Linker Fundamentals in Visual Studio 2019
Russell HadleyJuly 25, 2019Jul 25, 201907/25/19
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.
Visual Studio Code C/C++ extension: March 2019 Update
Tara RajApril 4, 2019Apr 4, 201904/4/19
The March 2019 update of the Visual Studio Code C/C++ extension is now available. This release includes many new features and bug fixes, including IntelliSense caching, Build and Debug Active File, and configuration squiggles. For a full list of this release's improvements,
Linker Throughput Improvement in Visual Studio 2019
YongKang ZhuMarch 20, 2019Mar 20, 201903/20/19
In Visual Studio 2019 Preview 2 we made the compiler back-end to prune away debug information that is unrelated to code or data emitted into binary and changed certain hash implementations in the PDB engine, to improve linker throughput, which resulted in more than 2x reduction on link time for some large AAA game title.
Visual Studio 2017 Throughput Improvements and Advice
Terry MahaffeyJanuary 4, 2018Jan 4, 201801/4/18
As C++ programs get larger and larger and the optimizer becomes more complex the compiler's build time, or throughput, increasingly comes into focus. It's something that needs to be continually addressed as new patterns emerge and take hold (such as "unity"
Faster C++ build cycle in VS 2017 with /Debug:fastlink
Ankit AsthanaOctober 5, 2016Oct 5, 201610/5/16
Continuing with our goal of further improving developer productivity with Visual Studio 2017 there have been major investments made for also improving incremental developer builds. The developer incremental build is one where a developer changes a single or multiple source files and builds.
Faster C++ solution load with VS 2017
The Visual C++ product has had projects ever since its inception. Visual C++ had its own IDE up through Visual Studio 6. Starting in Visual Studio .NET, C++ moved to a new IDE shared by Visual Basic, C#, C++, and other tools.
General C++ Series
Clear, Functional C++ Documentation with Sphinx + Breathe + Doxygen + CMake
Sy BrandJune 3, 2019Jun 3, 201906/3/19
Writing good documentation is hard. Tools can't solve this problem in themselves, but they can ease the pain. This post will show you how to use Sphinx to generate attractive, functional documentation for C++ libraries, supplied with information from Doxygen. We'll also integrate this process into a CMake build system so that we have a unified workflow.
Q&A: Fine-grained friendship
Herb SutterNovember 20, 2018Nov 20, 201811/20/18
This post is part of a regular series of posts where the C++ product team here at Microsoft answers questions we have received from customers. The questions can be about anything C++ related: Visual C++, the standard language and library, the C++ standards committee,
Standard Library Algorithms: Changes and Additions in C++17
Visual CPP TeamOctober 16, 2018Oct 16, 201810/16/18
Today we have a guest post from Marc Gregoire, Software Architect at Nikon Metrology and Microsoft MVP since 2007.
The C++14 standard already contains a wealth of different kinds of algorithms. C++17 adds a couple more algorithms and updates some existing ones.
How to Use Class Template Argument Deduction
Stephan T. Lavavej - MSFTOctober 11, 2018Oct 11, 201810/11/18
Class Template Argument Deduction (CTAD) is a C++17 Core Language feature that reduces code verbosity. C++17's Standard Library also supports CTAD, so after upgrading your toolset, you can take advantage of this new feature when using STL types like std::pair and std::vector.
std::any: How, when, and why
Casey CarterOctober 4, 2018Oct 4, 201810/4/18
ARM GCC Cross Compilation in Visual Studio
Marc GoodnerOctober 23, 2017Oct 23, 201710/23/17
⏱ Updated on January 10, 2018 to cover addition of debugging support in Visual Studio 2017 15.6
In Visual Studio 2017 15.5 we are introduced support for cross compilation targeting ARM microcontrollers. The 15.6 Preview 2 release adds debugging support.
Visual C++ for Linux 1.0.5 Updates
Marc GoodnerSeptember 13, 2016Sep 13, 201609/13/16
The Visual C++ for Linux announcement post has been updated with the content below. If you are already familiar with this extension this post covers what is new since our last update.
We recently posted new bits for our 1.0.5 release of the Visual C++ for Linux extension for Visual Studio 2015.
Visual C++ for Linux Updates
Marc GoodnerJune 7, 2016Jun 7, 201606/7/16
Updated 6/14/2016: We updated the original announcement post with the content below if you want a single page that covers everything about this extension. The below remains the same and just covers the updates from the original release.
We're happy to provide an update on the VC++ for Linux extension which has a new release today.
Visual Studio Code C/C++ extension: May 2019 Update
Tara RajMay 3, 2019May 3, 201905/3/19
The May 2019 update of the Visual Studio Code C/C++ extension is now available to C/C++ extension Insiders. This release includes many new features, including Visual Studio Code Remote Development extensions with C/C++, an IntelliSense Configurations settings UI, and IntelliSense improvements.
Migration DevLab
Binary Compatibility and Pain-free Upgrade: Why Moving to Visual Studio 2017 is almost "too easy"
Marian Luparu [MSFT]March 7, 2017Mar 7, 201703/7/17
Visual Studio 2017 is a major leap forward in terms of C++ functionality compared with VS 2015. We hope the new release will delight you in your day-to-day job as soon as you can upgrade.
This blog post focuses on the steps needed to upgrade from Visual Studio 2015 to 2017.
Stuck on an older toolset version? Move to Visual Studio 2017 without upgrading your toolset
Marian Luparu [MSFT]February 24, 2016Feb 24, 201602/24/16
⏱ Updated on March 11, 2019 with the latest functionality in Visual Studio 2017
Are you currently developing your C++ projects in an older version of Visual Studio? If your reasons for avoiding the all-new features in VS 2017 are covered next,
Android NDK R15C support goes in-box in Visual Studio 2017 Version 15.6 Preview
Rong LuDecember 13, 2017Dec 13, 201712/13/17
Visual Studio has provided in-box support for building C++ Android and iOS apps or libraries since VS 2015, enabling cross-platform C++ mobile development with full editing and debugging capabilities all in one single IDE.
Just recently, we updated the tools to make it easier for you to work with newer versions of the Android platform.
New code analysis quick fixes for uninitialized memory (C6001) and use before init (C26494) warnings
eli fesslerMay 7, 2019May 7, 201905/7/19
In the latest Preview release of Visual Studio 2019 version 16.1, we've added two quick fixes to the Code Analysis experience focused around uninitialized variable checks. These quick fixes are available via the Quick Actions (lightbulb) menu on relevant lines, accessed by hovering over the line or squiggle,
C++ Tutorial: Hello World
Eric BattalioJune 16, 2017Jun 16, 201706/16/17
Welcome to the C++ Tutorial.
In this first C++ tutorial, you will learn how to write (and run!) your first C++ program, "Hello, World!". Along the way you will learn a little C++ history, see how to configure a C++ console application in Visual Studio 2017,
Bring your C++ code to Visual Studio
Marian Luparu [MSFT]April 14, 2017Apr 14, 201704/14/17
C++ has been around for a long time and throughout its history many tools have been built to make life easier for C++ developers. This has led to a diverse C++ ecosystem in terms of the editing tools, build systems, coding conventions,
Migrate your existing Windows C++ projects to MSBuild
If your project targets one of the Windows platforms only (Desktop or UWP), you should consider using MSBuild as your C++ build system. If you consider expanding beyond these platforms though, consider using CMake to specify your build. To learn more,
Bring your existing Android Eclipse projects to Visual Studio
You can use Visual Studio to develop your C++ projects targeting Android. To learn more about this support read the Visual C++ for Cross-Platform Mobile development section on MSDN.
If you're currently using Eclipse and considering moving to Visual Studio, you can do that via our Eclipse Android Project Import Wizard.
Bring your existing C++ Linux projects to Visual Studio
Visual Studio supports targeting Linux out of the box – you can edit, remote build and remote debug to a Linux machine (whether that's a remote machine, a VM running locally or in the cloud, or WSL in Windows 10).
This article covers the high-level steps to bring your existing Linux projects to Visual Studio.
Bring your existing Qt projects to Visual Studio
Qt framework is an ever growing cross-platform C++ framework, ideal for building desktop, mobile, and even embedded solutions. While you can use CMake to target Qt (if you do, you should read more about the Visual Studio support for CMake), Qt also provides its own Qt-optimized build system called qmake.
CMake support in Visual Studio
Marian Luparu [MSFT]October 5, 2016Oct 5, 201610/5/16
⏱ Updated on October 5, 2017 with the latest functionality included with Visual Studio 2017 15.4
Visual Studio 2017 introduces built-in support for handling CMake projects. This makes it a lot simpler to develop C++ projects built with CMake without the need to generate VS projects and solutions from the command line.
Bring your C++ codebase to Visual Studio with "Open Folder"
⏱ Updated on March 06, 2017 with the latest functionality in Visual Studio 2017 RTW
Welcome to Visual Studio 2017! Starting with this release, Visual Studio supports opening folders containing source code without the need to create any solutions or projects.
OpenFolder
Introducing the New CMake Project Settings UI
Visual Studio 2019 Preview 2 introduces a new CMake Project Settings Editor to help you more easily configure your CMake projects in Visual Studio. The editor provides an alternative to modifying the CMakeSettings.json file directly and allows you to create and manage your CMake configurations.
IntelliSense Enhancements for C++ Open Folder and CMake
Will BuikJanuary 10, 2018Jan 10, 201801/10/18
Today's preview of Visual Studio 2017 version 15.6 Preview 2 includes two IntelliSense improvements to streamline code editing for C++ Open Folder and CMake. We added a new type of IntelliSense squiggle to C++ Open Folder and CMake to streamline cross-platform development.
Customizing your Environment with Visual C++ and Open Folder
Ever since we shipped support for opening a folder of C++ code, the community has been asking for more control over their build and editing environments. To achieve this, we have added new ways to customize your environment with CppProperties.json in the latest version of Visual Studio 2017.
Remote tasks in Visual Studio
We have introduced a new capability to run remote tasks in Visual Studio 2017 15.5 Preview 2. This capability allows you to run any command on a remote system that is defined in Visual Studio's Connection Manager. Remote tasks also provide the capability to copy files to the remote system.
CMake support in Visual Studio – CMake 3.9, Linux targeting, feedback
Visual Studio 2017 15.4 Preview 2 is now available and includes enhancements to Visual Studio's CMake tools. The latest preview upgrades CMake to version 3.9, includes better support for independent CMakeLists, and supports targeting Linux directly.
Please check out the preview and try out the latest CMake features.
Using MinGW and Cygwin with Visual C++ and Open Folder
Will BuikJuly 19, 2017Jul 19, 201707/19/17
Building cross-platform C and C++ code is easier than ever with Visual Studio 15.3 Preview 4. The latest preview improves support for alternative compilers and build environments such as MinGW and Cygwin. MinGW (Minimalist GNU for Windows), in case you are not familiar with it,
Game performance improvements in Visual Studio 2019 version 16.2
Natalia GlagolevaAugust 8, 2019Aug 8, 201908/8/19
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.
Improving the Performance of Standard Library Functions
Kirsten LeeJuly 30, 2019Jul 30, 201907/30/19
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 (std::div,
Inlining Decisions in Visual Studio
Terry MahaffeyJuly 24, 2019Jul 24, 201907/24/19
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.
Accelerating Compute-Intensive Workloads with Intel® AVX-512
Intel CorporationApril 19, 2019Apr 19, 201904/19/19
This guest post was authored by Junfeng Dong, John Morgan, and Li Tian from Intel Corporation.
Last year we introduced Intel® Advanced Vector Extensions 512 (Intel® AVX-512) support in Microsoft* Visual Studio* 2017 through this VC++ blog post. In this follow-on post,
SIMD Extension to C++ OpenMP in Visual Studio
Hongtao YuMarch 27, 2019Mar 27, 201903/27/19
In the era of ubiquitous AI applications there is an emerging demand of the compiler accelerating computation-intensive machine-learning code for existing hardware. Such code usually does mathematical computation like matrix transformation and manipulation and it is usually in the form of loops.
Game performance and compilation time improvements in Visual Studio 2019
Gratian LupMarch 19, 2019Mar 19, 201903/19/19
The C++ compiler in Visual Studio 2019 includes several new optimizations and improvements geared towards increasing the performance of games and making game developers more productive by reducing the compilation time of large projects. Although the focus of this blog post is on the game industry,
MSVC code optimizer improvements in Visual Studio 2017 versions 15.5 and 15.3
Gratian LupDecember 3, 2017Dec 3, 201712/3/17
In this post, we'd like to give you an update on the significant progress the Visual C++ code optimizer made in the past year, focused mostly on the features released in the 15.3 and 15.5 versions. Compared to VS2015 Update 3,
Spring 2018 Visual C++ Migration Survey
EricMitteletteJune 7, 2018Jun 7, 201806/7/18
The Spring 2018 Visual C++ Migration Survey is now open.
Please take a few minutes to share your experiences, positive or not so positive. If you have not migrated your solutions and project to Visual Studio 2017, please let us know why.
vcpkg 3 Months Anniversary, Survey
vcpkg, a tool to acquire and build C++ open source libraries on Windows, was published 3 months ago. We started with 20 libraries and now the C++ community has added 121 new C++ libraries. We really appreciate your feedback and we created a survey to collect it.
C++ code analysis: tell us what you think!
Andrew PardoeSeptember 27, 2016Sep 27, 201609/27/16
We'd love to hear more about what you would like to see in C++ code analysis. We're running a short survey–just 20 questions–to help us understand how to make C++ code analysis and Visual C++ better.
Please take a couple of minutes to fill out our C++ Code Analysis survey and let us know your thoughts.
C++ Unit Testing Survey (Summer 2016)
Augustin PopaJuly 14, 2016Jul 14, 201607/14/16
Hi everyone! The Visual Studio C++ team is conducting a survey to learn more about your C++ unit testing experiences. We'll use the feedback to make improvements to Visual Studio in the future. The survey should take less than 10 minutes to complete.
C-Runtime Deployment: Why choose AppLocal?
Visual CPP TeamApril 18, 2016Apr 18, 201604/18/16
There are three main ways to depend on and deploy the Visual C++ libraries and the Universal CRT:
You can depend on the Visual C++ libraries and Universal CRT DLLs and deploy those DLLs centrally using the redistributables (the VCRedist, MSMs,
Do You Develop Games?
Eric BattalioFebruary 12, 2016Feb 12, 201602/12/16
Or have you worked on a game recently?
If so, please share some details about your experience. The Microsoft Visual Studio team would like to learn more about your current game development experience. The survey should take less than ~10 minutes.
Cppp 2019 Trip Report
Sy BrandJune 25, 2019Jun 25, 201906/25/19
CPPP is a new C++ conference in Paris, France. Its first iteration ran for a single day with three parallel tracks, drawing in 160 attendees.
The conference great on all fronts: the speakers & talks were varied and high-quality, the venue was right next to the Eiffel Tower and had plenty of space,
VC++ Migration Documentation
Visual C++ 2015 and 2017 Migration Documentation Update
EricMitteletteSeptember 19, 2016Sep 19, 201609/19/16
Upgrading to the latest C++ compiler and toolset is sometimes not so easy and can be time consuming. You are likely to encounter some compiler and linker errors and warnings in code that previously compiled cleanly. There are several possible sources for these errors,
Vcpkg
Use the official Boost.Hana with MSVC 2017 Update 8 compiler
Ulzii Luvsanbat [MSFT]August 30, 2018Aug 30, 201808/30/18
We would like to share a progress update to our previous announcement regarding enabling Boost.Hana with MSVC compiler. Just as a quick background, Louis Dionne, the Boost.Hana author, and us have jointly agreed to provide a version of Boost.Hana in vcpkg to promote usage of the library among more C++ users from the Visual C++ community.
Use Boost.Hana via vcpkg with the latest MSVC compiler
Ulzii Luvsanbat [MSFT]June 4, 2018Jun 4, 201806/4/18
As we continue to work towards improving the conformance of the MSVC compiler for the C++ community, we would like to enable more C++ libraries, and today we are bringing Boost.Hana to Visual C++. Building on our recent C++ conformance progress,
Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg
EricMitteletteApril 24, 2018Apr 24, 201804/24/18
At Microsoft, the core of our vision is "Any Developer, Any App, Any Platform" and we are committed to bringing you the most productive development tools and services to build your apps across all platforms. With this in mind, we are thrilled to announce today the availability of vcpkg on Linux and MacOS.
Vcpkg: introducing installation options with Feature Packages
EricMitteletteFebruary 6, 2018Feb 6, 201802/6/18
We are happy to announce a new feature for vcpkg in version 0.0.103: Feature Packages.
Vcpkg is a package manager to help acquiring and building open source libraries on Windows; vcpkg currently offers over 600 C++ libraries available for VS2017 and VS2015.
Vcpkg: Introducing the upgrade command
If you're just getting started and want to learn more about vcpkg, check out our initial post.
We recently added a new option to vcpkg (i.e. vcpkg contact –survey) to provide a direct way to share your feedback with the Vcpkg team.
Vcpkg: Using multiple enlistments to handle multiple versions of a library
EricMitteletteOctober 23, 2017Oct 23, 201710/23/17
Vcpkg allows you to acquire and build 3rd party libraries on Windows. Once cloned, the vcpkg directory (enlistment) provides a stable set of libraries that are all compatible and based on the latest published version of these libraries. Occasionally, you may need different versions of the same library.
Vcpkg: introducing export command
EricMitteletteMay 3, 2017May 3, 201705/3/17
Vcpkg helps you acquire and build open source libraries on Windows. Since September 2016, the community added more than 200 libraries in the vcpkg catalog and has been contributing actively to the code itself. Vcpkg now supports Visual Studio 2015 and Visual Studio 2017 and can target dynamic or static libraries and platforms like x64,
Visual Studio Code C/C++ extension: January 2019 Update
Tara RajJanuary 31, 2019Jan 31, 201901/31/19
[Updated on 11/4/2019] – Removed mentions of "Improved Member Function Completion" which is no longer supported based on user feedback.
The January 2019 update of the Visual Studio Code C++ extension is now available. This release includes many new features and bug fixes including documentation comments support,
Visual Studio Code C/C++ extension August 2018 Update
Late last week we shipped the August 2018 update to the C/C++ extension for Visual Studio Code. This update included support for "Just My Code" symbol search, a gcc-x64 option in the intelliSenseMode setting, and many bug fixes. You can find the full list of changes in the release notes.
Visual Studio Code C/C++ extension July 2018 Update and IntelliSense auto-configuration for CMake
Rong LuJuly 25, 2018Jul 25, 201807/25/18
Last week we shipped the July 2018 update to the C/C++ extension for Visual Studio Code. In this update we added support for a new experimental API that allows build system extensions to pass IntelliSense configuration information to our extension for powering up full IntelliSense experience.
Visual Studio Code C/C++ extension June 2018 Update
Rong LuJune 21, 2018Jun 21, 201806/21/18
Today we're very happy to announce the availability of the June 2018 update to the C/C++ extension for Visual Studio Code! In this update, we are continuing our efforts to make IntelliSense configuration easier by auto-detecting compile_commands.json files for IntelliSense,
Writing Code
Improved C++ IntelliCode now Ships with Visual Studio 2019
Nick UhlenhuthApril 24, 2019Apr 24, 201904/24/19
IntelliCode support for C++ previously shipped as an extension, but it is now an in-box component that installs with the "Desktop Development with C++" workload in Visual Studio 2019 16.1 Preview 2. Make sure that IntelliCode is active for C++ by enabling the "C++ base model" under Tools >
std::optional: How, when, and why
Casey CarterSeptember 4, 2018Sep 4, 201809/4/18
Building your C++ application with Visual Studio Code
Ankit AsthanaOctober 24, 2016Oct 24, 201610/24/16
Over the last few months, we have heard a lot of requests with respect to adding capability to Visual Studio Code to allow developers to build their C/C++ application. The task extensibility in Visual Studio Code exists to automate tasks like building,
Getting Started with C++ in VS
Bring Your Existing C++ Code to VS
C++ Code Editing & Navigation
C++ Unit Testing
C++ Debugging & Diagnosics
Collaborating with Your Team in VS
C++ Windows Development
C++ pnux Development
C++ Android & iOS Development
C++ Game Development