Use this tag for code that must compile as C++11 (not using any features introduced in C++14 or later).
C++11 is the name of a version of the C++ standard approved in the year 2011. It replaced the previous standard, C++03, adding various core language changes and fixes, and an improved and expanded standard library. C++11 had earlier been referred to as C++0x, because it was originally expected to be published before 2010.
The ISO standard, 14882:2011, is withdrawn from the ISO website. The final draft was approved by the C++ working group on the 25th of March 2011. The publicly-available draft closest to C++11 is N3337, which has only editorial differences from the full standard.
Later versions of the language standard were approved and published in 2014 and 2017 (C++14 and C++17 respectively), and questions related to them bear the tags c++14 and c++17 here on StackOverflow. Each of these supersedes the previous, just as C++11 superseded C++03.
Please tag questions about C++11 with the c++ tag, along with the c++11 tag.
Resources
- Wikipedia's C++11 Article (may be slightly out of date)
- Bjarne Stroustrup's C++11 FAQ
- C++ Standards Committee Page
- The just::thread C++0x thread support and atomic operations library
- Standard C++ Homepage
- The C++ Programming Language (4th Edition)
New and Changed Features
- Lambda expressions
- Care and Feeding for R-value references and move support:
- Technical definition of R-value references.
- Should I return objects by R-value reference?
- What are move semantics
- How do I use move support for function parameters?
- Type-traits for movable types.
- State of standard objects after movement.
- Declare move and copy assignment when explicitly needed with one function.
- Move with noexcept.
- Move only with temporaries or an explicit statement.
- Static Asserts for compile time asserts (as errors)
- Uniform initialization/initializer lists:
- Perfect forwarding and R-value references.
- What are the new rules for PODs?
- What are rvalues, lvalues, xvalues, glvalues, and prvalues?
- C++11 Smart Pointers
- Changed C++ idioms in C++11:
- What breaking changes are introduced in C++11?