Monday, June 10, 2013

Polymorphic Allocators and Concepts in C++14

With the release of the first feature complete C++11 compiler gcc 4.8.1, you might consider taking a peak at the upcoming standard C++14.
Two - in my opionion - very interesting aspects are:

  1. Polymorphic Allocators - The object type should be independent of the container. This is especially important when you consider two containers whose data have been allocated with different allocators. In previous standards they are incompatible, but with C++14 they will not depend on the allocator anymore.
  2. Concepts are finally introduced in C++. Concepts are very helpful for template programming and restricting the type of the template parameters. This will make interfaces much clearer and also reduce cryptic template error messages, very helpful both for developers and users. Examples for concepts are Iterators, Containers, Numerical, etc.
Those are only two features of many to come in C++14. If you want to check out more propositions and ideas, there is a blog that dedicated four rather long posts on papers regarding C++14:
1 2 3 4

No comments:

Post a Comment