Code that is written to the 2011 version of the C++ standard, sometimes known by its pre-publication name of "C++0x". Use in conjunction with the 'c++' tag.

Use this tag for code that is to be compiled as C++11, published as ISO/IEC 14882:2011 in September 2011.

  • Predecessor: C++03
  • Successor: C++14

Some of the main improvements of C++11, compared to C++03, include:

  • an expanded standard library
  • type inference using the auto keyword
  • lambda expressions, as in [](int x) { return x * x; }
  • a range-based for loop, as in for (auto &x : my_array) ...
  • move constructors
  • constructor chaining
  • a more natural syntax for the initialization of objects
  • multithreading support
  • generic programming support
history | excerpt history