C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Cppp 2019 Trip Report
Summary 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, the food was tasty and varied (shoutout to the cream filled pastries), and the day went smoothly with strong communication from the organisers (Joel Falcou and Fred Tingaud). The three tracks were themed on roughly beginner, intermediate, and expert content, where the beginner track was in French an...
Clear, Functional C++ Documentation with Sphinx + Breathe + Doxygen + CMake
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. For an example of a real-world project whose documentation is built like this, see fmtlib. Why Sphinx? Doxygen has been around for a couple of decades and is a stable, feature-rich tool for generating documentation. However, it is not without its issues. Docs...
CMake 3.14 and Performance Improvements
In Visual Studio 2019 version 16.1 we have updated the version of CMake we ship inbox to CMake 3.14. This comes with performance improvements for extracting generated build system information. Additionally, we now support virtually all the Visual Studio capabilities regardless of the CMake binary origin so long as the CMake version is at least 3.14. The main reason for this is the introduction of the file-based API, which we now support, and which provides a new way for retrieving semantic information. This is now the recommended way to connect an IDE to CMake, the old CMake server being deprecated, and we are an...
Quick Info Improvements in Visual Studio 2019: Colorization and Search Online
The Quick Info tooltip has received a couple of improvements in Visual Studio 2019 version 16.1 Preview 3. Quick Info Colorization While Quick Info was previously all black text, the tooltip now respects the semantic colorization of your editor: If you’d like to customize your semantic colorization, you can do that by searching “font” in the Visual Studio Search box (Ctrl + Q), or by navigating to Tools > Options > Environment > Fonts and Colors: Quick Info Search Online The Quick Info tooltip has a new “Search Online” link that will search for online docs to learn more about the ho...
Visualize your build with IncrediBuild’s Build Monitor and Visual Studio 2019
There’s seeing your build, and then there’s REALLY seeing your build. The difference can be quite dramatic, unveiling a new world of possibilities. As part of a partnership between IncrediBuild and Visual Studio, you can enjoy these possibilities directly within Visual Studio. We previously discussed IncrediBuild, a software acceleration technology that speeds up your builds, tests, and other development process times. While IncrediBuild’s solution is known mainly for its impressive development acceleration capabilities, there’s another, very interesting capability to take note of: IncrediBuild’s Build Monitor...
Linux Development with C++ in Visual Studio 2019: WSL, ASan for Linux, Separation of Build and Debug
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 integration, and the ability to separate build and debug targets. If you’re just getting started with cross-platform development, I recommend trying our native support for WSL. Native support for the Windows Subsystem for Linux (WSL) Visual Studio now provides native support for using C++ with WSL. WSL lets you run a lightweight Linux e...
AddressSanitizer (ASan) for the Linux Workload in Visual Studio 2019
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: You can enable ASan for MSBuild-based Linux projects and CMake projects that target a remote Linux system or WSL (Windows Subsystem for Linux). If you are just getting started with cross-platform development, I recommend following this walk-through to get started with Visual Studio’s native support for WSL. ASan detects errors that are encountered during program execution a...
New code analysis quick fixes for uninitialized memory (C6001) and use before init (C26494) warnings
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, or by pressing Ctrl+Period. The first release of Visual Studio 2019 brought in-editor code analysis and various C++ productivity improvements, including a quick fix for the NULL to nullptr rule and others. In implementing further code analysis quick fixes, we are basing decisions on the following criteria:...
C++ with Visual Studio 2019 and Windows Subsystem for Linux (WSL)
This post was updated on December 11, 2020 Visual Studio 2019 version 16.1 added native support for using C++ with the Windows Subsystem for Linux (WSL). WSL lets you run a lightweight Linux environment directly on Windows, including most command-line tools, utilities, and applications. In Visual Studio you no longer need to add a remote connection or configure SSH in order to build and debug on your local WSL installation. This will save you time getting up and running in a Linux environment and eliminates the need to copy and maintain sources on a remote machine. In order to use our native support for WSL yo...