C++ Team Blog

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

C++11 Features in Visual C++ 11

UPDATE - March 2, 2012: the range-based for-loop and override/final v1.0 have been implemented in VC11 Beta. There's a new C++ Standard and a new version of Visual C++, and it's time to reveal what features from the former we're implementing in the latter!Terminology notes: During its development, the new C++ Standard was (optimistically...

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

Advanced STL Lectures, Part 5: the Boost Library

(image) In this 5th part of the advanced series, Stephan T. Lavavej digs into the Boost Library. In his words, it's an open source, super quality, community-driven Standard Template Library (STL). Stephan will walk you through a sample application from end to end, using Boost. New to the Standard Template Library? Watch Stephan’s ...

Just Posted: Stephan T. Lavavej’s Advanced STL, 4 of n

(image) The 4th part of this series digs into rvalue references, perfect forwarding and associative containers. Advanced STL covers the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and be able to pay attention! Stephan is a great teacher and we are so ...

_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, ...

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