C++ Team Blog
The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team
Latest posts
Standard Library Algorithms: Changes and Additions in C++17
Today we have a guest post from Marc Gregoire, Software Architect at Nikon Metrology and Microsoft MVP since 2007. The C++14 standard already contains a wealth of different kinds of algorithms. C++17 adds a couple more algorithms and updates some existing ones. This article explains what’s new and what has changed in the C++17 Standard Library. New Algorithms Sampling C++17 includes the following new sampling algorithm: It uses the given random number generator () to pick random elements from a given range [, ) and writes them to the given output iterator (). Here is a simple piece of c...
How to Use Class Template Argument Deduction
Class Template Argument Deduction (CTAD) is a C++17 Core Language feature that reduces code verbosity. C++17's Standard Library also supports CTAD, so after upgrading your toolset, you can take advantage of this new feature when using STL types like std::pair and std::vector. Class templates in other libraries and your own code will partially benefit from CTAD automatically, but sometimes they'll need a bit of new code (deduction guides) to fully benefit. Fortunately, both using CTAD and providing deduction guides is pretty easy, despite template metaprogramming's fearsome reputation! CTAD support is availab...
std::any: How, when, and why
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 ...
CUDA 10 is now available, with support for the latest Visual Studio 2017 versions
We are pleased to echo NVIDIA announcement for CUDA 10 today, and particularly excited about CUDA 10.0's Visual Studio compatibility. CUDA 10.0 will work with all the past and future updates of Visual Studio 2017. To stay committed to our promise for a Pain-free upgrade to any version of Visual Studio 2017, we partnered closely with NVIDIA for the past few months to make sure CUDA users can easily migrate between Visual Studio versions. Congratulations to NVIDIA for this milestone and thank you for a great collaboration! A Bit of Background In various updates of Visual Studio 2017 (e.g. 15.5) and even earlier m...
Step Back – Going Back in C++ Time
Step Back for C++ In the most recent, 15.9, update to Visual Studio 2017 Enterprise Edition, we’ve added “Step Back” for C++ developers targeting Windows 10 Anniversary Update (1607) and later. With this feature, you can now return to a previous state while debugging without having to restart the entire process. It’s installed as part of the C++ workload but set to “off” by default. To enable it, go to Tools -> Options -> IntelliTrace and select the “IntelliTrace snapshots” option. This will enable snapshots for both Managed and Native code. Once “Step Back” is enabled, you will see snapshots appear...
Books on C++17
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 Marian Luparu. C++17 is an important evolution of the C++ language, and you may be wondering how you should get started learning about it. On our blog, you will always find the latest announcements related to our team’s work on C++17 and future standards and, as part of this new series,...
Chat with the Visual C++ Team at CppCon 2018
We are super excited to be returning to CppCon in Bellevue this year! We will have a table Monday – Friday where you can meet us and talk with us about Visual Studio, Visual Studio Code, and vcpkg. Additionally, we'd like to invite to you several sessions that folks from our team will be presenting this year: Monday, September 24th 14:00 – 15:00 How to Write Well-Behaved Value Wrappers by Sy Brand 15:15 – 16:15 How C++ Debuggers Work by Sy Brand Tuesday, September 25th 14:00 – 15:00 What Could Possibly Go Wrong?: A Tale of Expectations and Exceptions by Sy Brand and Phil Nash 15:15 – 15:45 Overl...
STL Features and Fixes in VS 2017 15.8
15.7 was our first feature complete C++17 library (except floating-point <charconv>), and in 15.8 we have addressed large numbers of outstanding bugs. As usual, we’ve maintained a detailed list of the STL fixes that are available. Visual Studio 2017 15.8 is available at https://visualstudio.microsoft.com/vs/. New Features We aren't actually driver developers ourselves and are interested in feedback in this area if there are things we can do to make these more usable in constrained environments. Correctness Fixes Performance and Throughp...
Parallel Custom Build Tools in Visual Studio 2017
Many projects need to use additional tools during their build to generate sources for further compilation or perform other custom build tasks. VC projects have always supported Custom Build Tool integration, but it had some limitations. One of the popular requests on UserVoice is Allow custom build tools to run in parallel. Another problem is that often custom build outputs need to be passed to other build tools (for instance, some tools can generate C/C++ sources, which need to be passed to the compiler) and there was no easy way to specify that. To solve these problems, we added support for parallel executio...