Practical commentary on C++11

The latest specfication of C++ is called C++11, and it was approved in early April of 2011. It is a 1325 page PDF that not too many programmers are going to bother to read. In fact, the features have been dribbling in for quite some time, and some of them are already supported in the latest edition of the GNU compiler. These features vary in their degree of familiarity.

There is an overview of the changes provided as a table (Currently in work: mouseover explanations for the sometimes oddly worded GNU explanations), with dates that the support became available. This site looks at some of the new features in greater depth and explains how you might find them useful in practical, commercial C++ programming. Where it is practical and needed I have supplied examples from my own coding.

The index of the expanded features/articles is below. For bookmarking purposes, the permalinks will remain constant or "const," if you prefer, but I will periodically realphabetize the list so that things don't get lost. The articles are being written as the topic comes up.

Each topic has its own page. I have used a CSS template from Matthew James Taylor to auto-reformat for portrait and landscape orientation on the iPad. I warn the reader that are are probably some cut-and-paste errors that may prevent excerpted code from compiling -- particularly with features not yet implemented in GNU g++ 4.5. As I find them, I will fix them.

The article on the new meaning of auto was the first article written, it is an improvement you will probably want to use, and I suggest taking a look at it to get a feel for the tone of voice and content of this information.


Last updated 2014-07-19T15:44:11+00:00.

  1. >> v. > >
  2. alignas and alignof
  3. auto
  4. constexpr
  5. enum, changes to ...
  6. for (range based)
  7. initializers (uniform initialization syntax)
  8. std::mutex
  9. nullptr
  10. std::regex (quasi-postponed; other things must come first)
  11. rvalue references (the && syntax)
  12. std::thread
  13. Unrestricted unions

Links to the standard

At the moment, the most up to date copy of the ISO document (at least that is publicly available) is this one from the Open Standards group.

Code examples

Unless otherwise credited, all the code examples are my own, taken/adapted from running production code. It would be harder to steal a product ten lines at a time, than it was for Johnny Cash to steal a car one part at a time. I feel that real world examples work best.