C++ Team Blog

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

Latest posts

Exploring Clang Tooling, Part 0: Building Your Code with Clang
Sep 18, 2018
Post comments count 0
Post likes count 2

Exploring Clang Tooling, Part 0: Building Your Code with Clang

Stephen Kelly
Stephen Kelly

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, who is a developer at Havok, a contributor to Qt and CMake and a blogger. This is the first post in a series where he is sharing his experience using Clang tooling in his current team. Conformance and Compatibility During the long development of C++ compilers so far, a few ...

Using C++17 Parallel Algorithms for Better Performance
Sep 11, 2018
Post comments count 7
Post likes count 2

Using C++17 Parallel Algorithms for Better Performance

Billy O'Neal
Billy O'Neal

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 Billy O'Neal. C++17 added support for parallel algorithms to the standard library, to help programs take advantage of parallel execution for improved performance. MSVC first added experimental support for some algorithms in 15.5, and the experimental tag was removed in 15.7. The inte...

std::optional: How, when, and why
Sep 4, 2018
Post comments count 0
Post likes count 6

std::optional: How, when, and why

Casey Carter
Casey Carter

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 Casey Carter. C++17 adds several new "vocabulary types" – types intended to be used in the interfaces between components from different sources – to the standard library. MSVC has been shipping implementations of , , and  since the Visual Studio 2017 release, but we haven't provided any...

Use the official Boost.Hana with MSVC 2017 Update 8 compiler
Aug 30, 2018
Post comments count 0
Post likes count 0

Use the official Boost.Hana with MSVC 2017 Update 8 compiler

Ulzii Luvsanbat [MSFT]
Ulzii Luvsanbat [MSFT]

We would like to share a progress update to our previous announcement regarding enabling Boost.Hana with MSVC compiler. Just as a quick background, Louis Dionne, the Boost.Hana author, and us have jointly agreed to provide a version of Boost.Hana in vcpkg to promote usage of the library among more C++ users from the Visual C++ community. We've identified a set of blocking bugs and workarounds and called them out in our previous blog, and stated that as we fix the remaining bugs, we will gradually update the version of Boost.Hana in vcpkg, ultimately removing it and replacing it with master repo. We can conduct th...

Q&A: How to specialize std::sort by binding the comparison function
Aug 29, 2018
Post comments count 0
Post likes count 0

Q&A: How to specialize std::sort by binding the comparison function

Herb Sutter
Herb Sutter

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: Visual C++, the standard language and library, the C++ standards committee, isocpp.org, CppCon, etc. Today's Q&A is by Herb Sutter. Question A reader recently asked: I am trying to specialize std::sort by binding the comparison function. I first tried: It couldn’t infer the parameter types. So then I tried: Is there a straightforward way to do this? Another example: Here bind has no trouble d...

Visual Studio Code C/C++ extension August 2018 Update
Aug 23, 2018
Post comments count 0
Post likes count 0

Visual Studio Code C/C++ extension August 2018 Update

Rong Lu
Rong Lu

Late last week we shipped the August 2018 update  to the C/C++ extension for Visual Studio Code. This update included support for “Just My Code” symbol search, a gcc-x64 option in the intelliSenseMode setting, and many bug fixes. You can find the full list of changes in the release notes. “Just My Code” symbol search Keyboard shortcut Ctrl+T in Visual Studio Code lets you jump to any symbols in the entire workspace. We have heard feedback that sometimes it is desired to have the system header symbols excluded from this search. In this update, we enabled “Just My Code” symbol search to filter out system symbol...

std::string_view: The Duct Tape of String Types
Aug 21, 2018
Post comments count 1
Post likes count 0

std::string_view: The Duct Tape of String Types

Billy O'Neal
Billy O'Neal

Visual Studio 2017 contains support for std::string_view, a type added in C++17 to serve some of the roles previously served by const char * and const std::string& parameters. string_view is neither a "better const std::string&", nor "better const char *"; it is neither a superset or subset of either. std::string_view is intended to be a kind of universal "glue" -- a type describing the minimum common interface necessary to read string data. It doesn't require that the data be null-terminated, and doesn't place any restrictions on the data's lifetime. This gives you type erasure for "free", as a function ...

C++ development with Docker containers in Visual Studio Code
Aug 14, 2018
Post comments count 0
Post likes count 0

C++ development with Docker containers in Visual Studio Code

Rong Lu
Rong Lu

Containers allow developers to package up an application with all the parts it needs, such as libraries and other dependencies, and ship it all out as one image. This is especially useful for C++ cross-platform development – with containers you can choose to target a platform that runs on a completely different operating system than your developer machine. And even if they are running on the same OS, the container technology ensures that the application will run on any other machines regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the c...

Using MSVC in a Docker Container for Your C++ Projects
Aug 13, 2018
Post comments count 3
Post likes count 1

Using MSVC in a Docker Container for Your C++ Projects

Marc Goodner
Marc Goodner

Containers encapsulate the runtime environment of an application: the file system, environment settings, and virtualized OS are bundled into a package. Docker containers have changed the way we think about build and test environments since they were introduced five years ago. Visual Studio’s setup and install expert, Heath Stewart, blogs regularly about how to install the Visual Studio Build Tools in a Windows Docker Container. Recently he explained why you won’t find a container image for build tools. Basically, any install that has a workload installed that you aren’t using is going to be bigger than you want....