C++ Team Blog

C++ tutorials, C and C++ news, and information about Visual Studio, Visual Studio Code, and Vcpkg from the Microsoft C++ team.

shared_ptr – Advanced STL, Part 1

Part 1 of my video lecture series exploring the Standard Template Library's implementation is now available.  In this part, I explain how some of shared_ptr's magic works, including type erasure and make_shared<T>()'s optimizations that save both space and time. This advanced series assumes that you're familiar with C++ and the...
Comments are closed.0 0
C++

PDC 2010: Lambdas, Lambdas Everywhere

Why care about C++0x lambda functions? Syntactically, they are nothing but sugar for function objects. However, they are an essential and enabling sugar that will change the way we will write C++ code more often than most people realize. This talk from last PDC covers what lambda functions are and how to use them effectively, including ...
Comments are closed.0 0
C++

Regular Expressions – Video Introduction to the STL, Part 8

C++0x's <regex> header combines Perl's regular expressions with C++'s templates and iterators.  The result, like the rest of the STL, is insanely powerful but potentially overwhelming at first sight.  It's actually easy to use, and much easier than writing string processing code by hand.  I demonstrate how to start using &...
Comments are closed.0 0
C++

Video Introduction to the STL, Parts 6 and 7

Part 6 and Part 7 of my video lecture series introducing the Standard Template Library are now available; they cover algorithms and functors. Previous parts:  Part 1 (sequence containers)Part 2 (associative containers)Part 3 (smart pointers)Part 4 (Nurikabe solver introduction)Part 5 (Nurikabe solver conclusion) My Nurikabe ...
Comments are closed.0 0
C++

Video Introduction to the STL, Part 5

In the fifth part of my video lecture series introducing the Standard Template Library, I explain how the advanced analysis in my Nurikabe solver works.  One of its steps involves using a breadth-first search to detect any unreachable cells. Mandatory prerequisites of Part 5 are reading Wikipedia's Nurikabe page and watching Part 4 (...
Comments are closed.0 0
C++

Video Introduction to the STL, Part 4

In the fourth part of my video lecture series introducing the Standard Template Library, I walk through an extended example of using the STL to solve Nurikabe puzzles.  It assumes that you've read Wikipedia's Nurikabe page, and that you've watched Part 1 (sequence containers), Part 2 (associative containers), and Part 3 (smart pointers), ...
Comments are closed.0 0
C++

Video Introduction to the STL, Part 3

The third part of my video lecture series introducing the Standard Template Library is now available, following Part 1 and Part 2.  Part 3 covers unique_ptr, shared_ptr, and exception handling (briefly).  It explains my solution to the container erasure problem, and presents a significantly larger homework problem: writing a Nurikabe...
Comments are closed.0 0
C++

The Filterator

My name is Ahmed Charles and I currently work on Windows Error Reporting.  I believe that this is the first time that someone not on the VC team has written a blog, but I hope you will find it useful anyways.  I’d like to thank Stephan T. Lavavej for the idea and valuable feedback while writing it.  And we both owe the ...
Comments are closed.0 0
C++