C++ Team Blog

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

Latest posts

Aug 15, 2017
Post comments count 0
Post likes count 0

How to use the C++ Core Guidelines Checker outside of Visual Studio

Andrew Pardoe

This post written by Sergiy Oryekhov and Andrew Pardoe The latest C++ Core Guidelines Checker is deployed as a part of the Native Code Analysis tools in Visual Studio 2017 15.3. These tools are designed for use in Visual Studio, which provides a rule set editor for filtering warnings. But what if you want to adopt the C++ Core Guidelines checks in your automated builds? Using the C++ Core Guidelines Checker with MSBuild The Native Code Analysis checker (PREfast) is integrated into the MSBuild environment by custom targets files. You can use project properties to enable it, as well as add the C++ Core Guideli...

Aug 14, 2017
Post comments count 0
Post likes count 0

CMake Support in Visual Studio: Customizing your Environment

Will Buik

In Visual Studio 15.3, there are new ways for you to apply advanced configuration to your CMake environments. Please download the latest and try out the latest CMake features.  If you are just getting started with CMake, follow the link to learn more about CMake support in Visual Studio.  We are looking forward to your feedback. What’s new in CMakeSettings.json The heart of this new flexibility is inside your project’s CMakeSettings.json file and it stems from two new concepts: Let’s start with a quick example of how using this feature might look: To unpack this a bit, this example defines tw...

Aug 14, 2017
Post comments count 0
Post likes count 0

Managing warnings in the C++ Core Guidelines Checker

Andrew Pardoe

This post written by Sergiy Oryekhov and Andrew Pardoe With several new rules added to the Core Guidelines Checker in Visual Studio 2017 15.3, the amount of warnings produced for pre-existing code may greatly increase. The C++ Core Guidelines include a lot of recommendations that cover all kinds of situations in C+ code. We know that not everyone can do large rewrites of legacy codebases. The techniques in this blog post will help you use the C++ Core Guidelines to start an incremental journey towards a cleaner codebase by selectively enabling warnings or enabling warnings on a selected code region. In some...

Aug 11, 2017
Post comments count 0
Post likes count 0

C++17 Features And STL Fixes In VS 2017 15.3

Stephan T. Lavavej - MSFT

Aug 11, 2017
Post comments count 0
Post likes count 0

C++ Core Guidelines Checker in Visual Studio 2017

Andrew Pardoe

This post written by Sergiy Oryekhov and Andrew Pardoe The C++ Core Guidelines can help improve your code and decrease your cost of maintenance by offering a wide range of recommendations: encouraging use of the standard library, avoiding use of unsafe practices whenever possible, maintaining a consistent style, and helping you to enforce reasonable design decisions. The number of Core Guidelines recommendations may look discouraging for those who own legacy code, but even a gradual cleanup process will provide immediate improvements to your code without requiring a total rewrite. We've implemented a set of cod...

Aug 4, 2017
Post comments count 0
Post likes count 0

C++ Unit Testing Updates: Announcing Boost.Test Adapter and Improved Google Test Support

Augustin Popa

Back in May, the C++ team announced the Test Adapter for Google Test – a Visual Studio extension that allows you to run and manage your Google Test-based unit tests directly in Visual Studio. You can do this using the Test Explorer window, and, if you’re a Visual Studio Enterprise user, you can run a code coverage analysis to check for code that isn’t being tested. Since that time, our team has been working on improving our unit testing support even further. If you’re new to C++ unit testing with Visual Studio, you may want to check out the blog post, C++ Unit Testing in Visual Studio, for an overview. The test...

Jul 28, 2017
Post comments count 0
Post likes count 0

Trip report: Evolution Working Group at the Summer ISO C++ standards meeting (Toronto)

Andrew Pardoe

点这里看中文版 The Summer 2017 ISO C++ standards meeting was held in July 10-15 at the University of Toronto. Many thanks to Google, Codeplay, and IBM for sponsoring the event, as well to folks from Mozilla, Collège Lionel-Groulx, Christie Digital Systems, and Apple for helping to organize. And, of course, we very much appreciate Waterfront International for sponsoring a banquet at the CN Tower. We had a productive and rather harmonious Evolution Working Group (EWG) session this year in Toronto. There were 45 proposals discussed over five days and three evening sessions: a Tuesday night session on Concepts and...

Jul 21, 2017
Post comments count 0
Post likes count 0

Diagnostic Improvements in Visual Studio 2017 15.3.0

Yuriy Solodkyy

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. Below you will find some of the new or improved diagnostic messages in the areas of member initialization, enumerations, dealing with precompiled headers, conditionals, and more. We will continu...

Jul 19, 2017
Post comments count 2
Post likes count 0

Using MinGW and Cygwin with Visual C++ and Open Folder

Will Buik

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, is a compiler in the GCC family designed to run natively on Windows.  If you are interested in a quick rundown of this new functionality, check out our latest GoingNative episode on Channel 9. Most MinGW installations, however, include much more than just a compiler.  Most distributions of MinGW include a whole host of other tools tha...