C++ Team Blog

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

Latest posts

Jan 31, 2019
Post comments count 4
Post likes count 0

Visual Studio Code C/C++ extension: January 2019 Update

Tara Raj

[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, improved #include autocomplete performance, and many IntelliSense bug fixes. For a full list of this release’s improvements, check out our release notes on Github. Documentation Comments We added support for documentation comments for hover, completion, and signature help. You can now see documentati...

Jan 28, 2019
Post comments count 0
Post likes count 0

New Code Analysis Checks in Visual Studio 2019: use-after-move and coroutine

Sunny Chatterjee

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. Use-after-move check C++11 introduced move semantics to help write performant code by replacing some expensive copy operations with cheaper move operations. With the new capabilities of the language, however, we have new ways to make mistakes. It’s important to have the tools to help find ...

Jan 28, 2019
Post comments count 0
Post likes count 0

Concurrency Code Analysis in Visual Studio 2019

Sunny Chatterjee

Concurrency Code Analysis in Visual Studio 2019 The battle against concurrency bugs poses a serious challenge to C++ developers. The problem is exacerbated by the advent of multi-core and many-core architectures. To cope with the increasing complexity of multithreaded software, it is essential to employ better tools and processes to help developers adhere to proper locking discipline. In this blog post, we’ll walk through a completely rejuvenated Concurrency Code Analysis toolset we are shipping with Visual Studio 2019 Preview 2. A perilous landscape The most popular concurrent programming paradigm in use toda...

Jan 24, 2019
Post comments count 0
Post likes count 0

Introducing the New CMake Project Settings UI

Erika Sweet

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. If you’re just getting started with CMake in Visual Studio, head over to our CMake Support in Visual Studio introductory page. The goal of this editor is to simplify the experience of configuring a CMake project by grouping and promoting commonly used settings, hiding advanced settings, and making it easier to ed...

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

In-editor code analysis in Visual Studio 2019 Preview 2

eli fessler

The C++ team has been working to refresh the Code Analysis experience inside Visual Studio. Last year, we blogged about some in-progress features in this area. We’re happy to announce that in Visual Studio 2019 Preview 2, we’ve integrated code analysis directly into the editor, improved upon previously experimental features, and enabled this as the default experience. In-editor warnings & background analysis Code analysis now runs automatically in the background, and warnings display as green squiggles in-editor. Analysis re-runs every time you open a file in the editor and when you save your changes. ...

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

C++ Productivity Improvements in Visual Studio 2019 Preview 2

Augustin Popa

Visual Studio 2019 Preview 2 contains a host of productivity features, including some new quick fixes and code navigation improvements: The Quick Actions menu can be used to select the quick fixes referenced below. You can hover over a squiggle and click the lightbulb that appears or open the menu with Alt + Enter. Quick Fix: Add missing #include Have you ever forgotten which header to reference from the C++ Standard Library to use a particular function or symbol? Now, Visual Studio will figure that out for you and offer to fix it: But this feature doesn’t just find...

Jan 24, 2019
Post comments count 4
Post likes count 0

Template IntelliSense Improvements for Visual Studio 2019 Preview 2

Nick Uhlenhuth

In the first version of Template IntelliSense, we introduced the Template Bar which allowed you to provide sample arguments for your template in order to get a richer IntelliSense experience within the template body. Since then, we’ve received a lot of great feedback and suggestions which have led to significant improvements. Our latest iteration includes the following: Peek Window UI and Live Edits Clicking the edit button on the Template Bar no longer brings up a modal dialog instead, it opens a Peek Window. The benefit of the Peek Window UI is that it integrates more smoothly into your wo...

Jan 24, 2019
Post comments count 2
Post likes count 0

MSVC Backend Updates in Visual Studio 2019 Preview 2: New Optimizations, OpenMP, and Build Throughput improvements

Daniel Donenfeld

In Visual Studio 2019 Preview 2 we have continued to improve the C++ backend with new features, new and improved optimizations, build throughput improvements, and quality of life changes. New Features New and Improved Optimizations Build Throughput Improvements Quality of Life Improvements We’d love for you to download Visual Studio 2019 and give it a try. As always, we welcome your feedback. We can be reached via the comments below or via email (visualcpp@microsoft.com). ...

Jan 24, 2019
Post comments count 0
Post likes count 0

Lifetime Profile Update in Visual Studio 2019 Preview 2

Kyle Reed

The C++ Core Guidelines' Lifetime Profile, which is part of the C++ Core Guidelines, aims to detect lifetime problems, like dangling pointers and references, in C++ code. It uses the type information already present in the source along with some simple contracts between functions to detect defects at compile time with minimal annotation. These are the basic contracts that the profile expects code to follow: For more information on the history and goals of the profile, check out Herb Sutter's blog post about version 1.0. What's New in Visual Studio 2019 Preview 2 In Preview 2, we've shipped a...