C++ Team Blog

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

do-while, casts, ODR, variadic templates – Core C++, Part 8

Part 8 of my third video lecture series (covering the C++ Core Language) is now available.  In this part, I covered several topics: why I avoid do-while loops, how C and C++ casts behave and why they're dangerous, what the One Definition Rule is and how to follow it, and how my toy program to sort arrays with variadic templates works.For ...
Comments are closed.0 0
C++

Good Stuff on Channel 9

Looking for the C++ Good Stuff? Have you visited Channel 9 lately? And in case you missed it: *spoiler,marketing*Do you like Visual C++? Like us on Facebook (and post something)!Thanks...
Comments are closed.0 0
C++

Template Argument Deduction – Core C++, Part 2

Part 2 of my third video lecture series (covering the C++ Core Language) is now available.  In this part, I took an hour to explore template argument deduction, including what "non-deduced contexts" are - and how they can be used to your advantage!  For reference, here are all of the links to my video lectures, plus my GoingNative ...
Comments are closed.0 0
C++

C9::GoingNative: Visual C++ Upcoming IDE Demos, a CRT Talk and More!!

(image) Greetings! Charles Torre and I came back with the second episode of Channel 9 Going Native –which is actually episode 1, considering that C++, as a C-like language, starts indexing from 0. This time we follow up from a recent article that my colleague and friend Sumit Kumar (Program Manager in the Visual C++ team) wrote last ...
Comments are closed.0 0
C++

Container Pretty Printer – Advanced STL, Part 6

In Part 6 of my second video lecture series focused on the Standard Template Library, I demonstrate how to write a "pretty printer" for STL containers that's capable of formatting a vector<tuple<int, string, int>> as [(1, "ten", 100), (2, "twenty", 200), (3, "thirty", 300)].  It's easy to use, with the default syntax being ...
Comments are closed.0 0
C++

Herb Sutter Shares Perspectives on the New C++ Standard

(image) Hi, I’m Charles Torre, Sr. Technographer with Channel 9. I’m back with an interview made last week with Herb Sutter, Principal Architect on the Visual C++ team at Microsoft and chairman of the ISO committee which recently approved the final technical changes to the C++0x standard – the publication of which is expected this ...
Comments are closed.0 0
C++

_ITERATOR_DEBUG_LEVEL – Advanced STL, Part 3

In Part 3 of my video lecture series exploring the Standard Template Library's implementation, I explain how our powerful correctness checks in debug mode work.  In VC10, they're controlled by the macro _ITERATOR_DEBUG_LEVEL, which supersedes VC8 and VC9's more confusing _SECURE_SCL and _HAS_ITERATOR_DEBUGGING macros.  Additionally, ...
Comments are closed.0 0
C++

Algorithm Optimizations – Advanced STL, Part 2

Part 2 of my video lecture series exploring the Standard Template Library's implementation is now available.  In this part, I walk through how our STL algorithms equal() and copy() use template metaprogramming to detect when it's safe to call memcmp() and memmove(), which are potentially faster than the generic loops. In Part 1's ...
Comments are closed.0 0
C++

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++

Herb Sutter: “Coding, like Speaking a Language, Implies that You Think in that Language”

Erik Meijer –host of the “Expert to Expert” series in Channel 9- interviews Herb Sutter -an Architect on the VC++ team and chair of the C++ Standards Committee.In this thought-provoking talk, Herb and Erik cover generic programming, function objects, lambdas, futures and argument passing by value vs. by reference, among other...
Comments are closed.0 0
C++