C++ Team Blog

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

Conditionally Trivial Special Member Functions

The C++ standards committee is currently focusing on adding features to the language which can simplify code. One small example of this in C++20 is conditionally trivial special member functions, which we added support for in Visual Studio 2019 version 16.8. Its benefit isn’t immediately obvious unless you’ve been deep down the rabbit hole...

GSL 3.0.0 Release

Update June 4th, 2020 - GSL version 3.1.0 has been released. Please see the latest release page for information regarding GSL 3.1.0. For all future updates, please see refer to the release page on GitHub.   GSL 3.0.0 Release Version 3.0.0 of Microsoft's implementation of the C++ Core Guidelines Support Library (GSL) is now available...

The Performance Benefits of Final Classes

The specifier in C++ marks a class or virtual member function as one which cannot be derived from or overriden. For example, consider the following code:  If we attempt to write a new class which derives from `derived` then we get a compiler error:  The specifier is useful for expressing to readers of the code that a class is not to...

C++20’s Conditionally Explicit Constructors

is a C++20 feature for simplifying the implementation of generic types and improving compile-time performance. In C++ it is common to write and use types which wrap objects of other types. and are two examples, but there are plenty of others in the standard library, Boost, and likely your own codebases. Following the principle of least ...

Simplify Your Code With Rocket Science: C++20’s Spaceship Operator

This post is part of a regular series of posts where the C++ product team here at Microsoft and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's post is by Cameron ...

Q&A: Fine-grained friendship

This post is part of a regular series of posts where the C++ product team here at Microsoft answers questions we have received from customers. The questions can be about anything C++ related: Visual C++, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's Q&A is by Herb Sutter. Question Reader...

Exploring Clang Tooling Part 2: Examining the Clang AST with clang-query

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, ...

Exploring Clang Tooling Part 1: Extending Clang-Tidy

This post is part of a regular series of posts where the C++ product team and other guests answer questions we have received from customers. The questions can be about anything C++ related: MSVC toolset, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today’s post is by guest author Stephen Kelly, ...