Introduction to C++11

In August 2011, a new C++ version which is known as C++11 is approved by ISO which adds a lot of new set of features to existing C++ programming language. All official documents related to these changes can be found at ISO C++ committee website.

Why C++11 ?

C++11 significantly improved the core C++ language by making several additions to its standard libraries. Major areas where C++11 is improved from its predecessor includes multithreading support, uniform initialization, generic programming support and performance.

Aims of C++11

  1.  Compatibility and Stability MUST be maintained for old code written in C++98,C++03 and in C.
  2.  Extension of core language preferably be done via standard library.
  3.  System and library design method is preferred compared to introducing new features which is useful only for specific applications.
  4.  Focus to improve type safety by providing safer methods to earlier unsafe methods.
  5.  Improve performance and better interaction with hardware to ensure better,safe and high performance embedded system programming.
  6.  Make C++ easier to teach and learn through increased uniformity, stronger guarantees, and facilities better libraries for beginners. Expert programmers can use other efficient features.


Let’s discuss the new features which are added as part of C++11.

1) Run Time Performance enhancements

2) Compile time performance enhancements

3) Usability or functionality enhancements

  • Initializer lists
  • Uniform initialization syntax
  • Type inference (metaprogramming)
  • Range-based for loop
  •  Lambda functions and expressions
  •  Trailing-Return-Type function syntax
  •  Object construction improvement
  •  Explicit overrides and final
  •  Null pointer constant
  •  Strongly typed enumerations
  •  Right angle bracket
  •  Explicit conversion operators
  •  Template aliases
  •  Generalized unions
  •  Variadic templates
  •  New string literals
  •  User-defined literals
  •  Multithreading memory model
  •  Thread-local storage
  •  Explicitly defaulted and deleted special member functions
  •  Type long long int
  •  Static assertions
  •  Allow sizeof to work on members of classes without an explicit object
  •  Control and query object alignment
  •  Allow garbage collected implementations
  •  Attributes

4) Standard Library Modifications

  •  Threading facilities
  •  Tuple types
  •  Hash tables
  •  Regular expressions
  •  General-purpose smart pointers
  •  Extensible random number facility
  •  Wrapper reference
  •  Polymorphic wrappers for function objects
  •  Type traits for metaprogramming
  •  Uniform method for computing the return type of function objects

Leave a Reply

Your email address will not be published. Required fields are marked *