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

Recently completed UserVoice Suggestions for Visual Studio
In our blog posts on the Visual C++ Team Blog, we often encourage readers to submit suggestions on how to improve Visual Studio via UserVoice. We review these suggestions regularly and often work to incorporate them into future releases. This post aims to provide an update, expanding on our previous entry on completed UserVoice suggestions, and to let you know which suggestions we’ve recently marked as Complete. The following list contains 22 completed suggestions, totaling 892 votes! If you voted for or suggested any of these items, your votes ...

Announcing: MSVC Conforms to the C++ Standard
Achieving conformance with the C++ Standards has been a long road for the Visual C++ team. If you've seen us at any conferences lately, you've probably seen the MSVC Conformance slide. (You can grab a copy of the slide or watch the 2017 CppCon talk here.) Finishing the features on this slide – which includes features from C++11, C++14, and C++17 – has been one of our team's main goals for the past few years. We're happy to announce that in Visual Studio 2017 version 15.7 we've implemented these features. (The Technical Specifications are work-in-progress as they make their ways into the Standard.) The MSVC com...

CMake Support in Visual Studio – Code Analysis and CMake 3.11

Visual Studio 2017 15.7 Preview 4 is now available and we have added a few more CMake features in addition to the Targets View and single file compilation added in Preview 3. We keep the version of CMake that ships with Visual Studio as fresh as possible, so we have updated it to version 3.11. We are also excited to announce that CMake projects now support the IDE’s code analysis features that previously required a VCXProj to take advantage of. Please download the preview and check out the latest CMake features such as the Targets View, single file compilation, and more control over when projects are configure...

Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg

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. This gives you immediate access to the vcpkg catalog of C++ libraries on two new platforms, with the same simple steps you are familiar with on Windows and UWP today. Vcpkg has come a long way since its launch at CppCon 2016. Starting from only 20 libraries, we have seen an incredible growth in the last 19 mont...

Spectre diagnostic in Visual Studio 2017 Version 15.7 Preview 4
Visual Studio 2017 version 15.7 Preview 4 adds a new capability to our Spectre mitigation: the ability to see where the compiler would have inserted a mitigation and what data led to that action. A new warning, C5045, lets you see what patterns in your code would have caused a mitigation, such as an LFENCE, to be inserted. This change builds upon our existing Spectre mitigation support, including the changes introduced in Preview 3. Complete details about are available in context in the original MSVC Spectre mitigation post on VCBlog. The new warning is also discussed below. Enabling C5045 The C5045 warning ...

IntelliSense for Remote Linux Headers
In Visual Studio 2017 15.7 Preview 3 we are introducing IntelliSense for headers on remote Linux connections. This is part of the Linux development with C++ workload that you can choose in the Visual Studio installer. If you are just getting started with the C++ Linux support in Visual Studio you can read our C++ Linux tutorial at aka.ms/vslinux. When you add a new connection in the Connection Manager we will automatically determine the include directories for the compiler on the system. Those directories will be zipped up and copied to a directory on your local Windows machine. Then, when you use that connectio...

Announcing CodeLens for C++ Unit Testing

If you are just getting started with unit testing in C++, visit our testing startup guide. C++ developers in Visual Studio can now get their first taste of CodeLens! Specifically, Visual Studio 2017 15.7 Preview 3 Professional and Enterprise editions offer CodeLens for Unit Testing. There are a few ways to initialize CodeLens: After performing any of the above actions, CodeLens will appear above each of your unit tests. CodeLens allows you to Run, Debug, and view the Test Status of your unit tests directly in the source file. The test status indicators are the same as the ones in the Test Explorer (W...

CMake Support in Visual Studio – Targets View, Single File Compilation, and Cache Generation Settings

Visual Studio 2017 15.7 Preview 3 is now available, which includes several improvements to the CMake tools. The latest preview offers more control than ever over how to visualize, build, and manage your CMake projects. Please download the preview and check out the latest CMake features such as the Targets View, single file compilation, and more control over when projects are configured. As always, we would love to hear your feedback too. If you are new to CMake in Visual Studio, check out how to get started. CMake Targets View The latest preview of Visual Studio offers a new way to visualize your CMake project...

Spectre mitigation changes in Visual Studio 2017 Version 15.7 Preview 3
With Visual Studio 2017 version 15.7 Preview 3 we have two new features to announce with regards to our Spectre mitigations. First, the /Qspectre switch is now supported regardless of the selected optimization level. Second, we have provided Spectre-mitigated implementations of the Microsoft Visual C++ libraries. Complete details are available in context in the original MSVC Spectre mitigation post on VCBlog. Changes in Update 3 are also listed below. In previous versions of MSVC we only added Spectre mitigations when code is being optimized. In Visual Studio 2017 version 15.7 Preview 3 we've added support for ...