C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Visual Studio Code C/C++ extension Jan 2018 update
点这里看中文版 Today we are shipping the first update of the year to the Visual Studio Code C/C++ extension! This update includes IntelliSense and code navigation performance improvements and a CPU Usage setting for the tag parser to specify the CPU resources to be used. Also, just recently we open-sourced part of the extension on GitHub. IntelliSense and code navigation performance improvements We enhanced the tag parser based IntelliSense engine by optimizing the list of files that need to be parsed, resulting in greatly improved performance for any features powered by the tag parser. This includes IntelliSense light...
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. A big thank you to those of you that shared your thoughts and suggestions with the team through this new channel. The new upgrade command we’re introducing today is a result of your direct feedback. This new command will perform all the necessary tasks: removing old version, purging outdated libraries, and then automatically installing the newest version of each library, includi...
Spectre mitigations in MSVC
Update 20 April 2018 With Visual Studio 2017 version 15.7 Preview 4 we have added a new warning, C5045, that shows what patterns in your code would have caused a mitigation to be inserted. See this post for more details. Update 4 April 2018 With Visual Studio 2017 version 15.7 Preview 3 we have two new features to announce with regards to our Spectre mitigations. First, the switch is now supported regardless of the selected optimization level. Second, we have provided Spectre-mitigated implementations of the Microsoft Visual C++ libraries. See below for details. Microsoft is aware of a new publicly disclose...
C++ Static Analysis Improvements for Visual Studio 2017 15.6 Preview 2
点这里看中文版 We've made a few changes to the C++ static analysis feature that should make it faster and easier to use. The behavior has changed slightly, and the menus have been moved around a bit, but we think that the new experience is faster and more consistent. Let's take a quick look at the changes. Single File Analysis Developers tend to focus on a few files at a time when working on code. To make it easier to get analysis results for the files you're editing, you can now run code analysis on a single file. This lets you get code analysis warnings without having to rebuild the entire project. We think this wil...
Boost.Test Unit Testing: Dynamic Library support and New Item Template
点这里看中文版 If you’re just getting started and want to learn more about C++ Unit Testing, check out our guide. We are excited to announce that, in addition to Boost.Test static library support, Visual Studio 2017 15.6 Preview 2 now offers Boost.Test dynamic library support and a Boost.Test item template. This means it is now easier than ever to incorporate Boost.Test unit tests into your Visual Studio projects. Boost.Test Dynamic Library If you are already using the Boost.Test dynamic library, your unit tests will be supported immediately. If you don’t already have Boost.Test on your machine, the simplest method f...
CMake Support in Visual Studio – Test Explorer Integration, CMake 3.10
点这里看中文版 We are excited to announce new CMake features in Visual Studio 2017 version 15.6 Preview 2. In the latest preview, we have improved CTest’s integration with the IDE, including rich support for the Google and Boost unit testing frameworks. If you are new to CMake in Visual Studio, check out how to get started. CTest in the Test Explorer with Google Test and Boost.Test Support One of the more frequent pieces of feedback we have received since adding basic support for CTest has been Test Explorer integration. I am excited to announce that CTest is fully integrated into the IDE in the latest Visual Studi...
IntelliSense Enhancements for C++ Open Folder and CMake
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. We also now support a new heuristic and wildcard syntax to the include path for C++ Open Folder. If you are new to CMake or Open Folder in Visual Studio, check out how to get started with CMake or other C++ projects. Cross-Platform IntelliSense Squiggles If you do cross-platform development in Visual Studio with CMake or C++ Open Folder you a...
Debugging an embedded ARM device in Visual Studio
点这里看中文版 We introduced support for ARM GCC cross compilation in Visual Studio 2017 in the 15.5 release. With 15.6 Preview 2, we are adding support for debugging. This overview of debugging capabilities follows from the setup for getting started ARM cross compilation and will be integrated there as an addendum. First, it is important to ensure your output has debugging symbols. In the case of the GCC projects exported from the ARM online compiler, they do not. To add them, edit the makefile under the tools and flags section and add the -g flag for the GCC and G++ commands like the below. Now after you have built...
Visual Studio 2017 Throughput Improvements and Advice
点这里看中文版 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" builds in gaming). It's something we're focusing on here in the Visual C++ Team, and has become a major point of emphasis during the most recent 15.5 release and will continue to be going forward. I want to take a few minutes to update everyone on some of the specific changes we've made to help with your compile times, and provide a few tips on how y...