Simpler C++ Code through C++11

With the release of the new ISO C++11 standard there are several areas where new syntax and library components will make writing C++ code simpler. For example, many textbooks and teachers refrain from introducing STL algorithms early on, because explaining functors or function pointers and dealing with the sometimes monstrous compiler error messages they believe is too hard for students. This makes C++ programmers writing the same kinds of loops over and over again, where they could have just called a corresponding algorithm instead. But that is just one area where C++03 leaves something to desire for writing simpler code. One could argue if a loop or calling an algorithm with a dedicate functor or a complex bind()-expression is simpler. C++11 remedies that a lot through either lambdas or the now standardized function type and bind() function.
Now we have a new standard and its universal initialization syntax, new meaning of auto, lambdas, concurrency support, variadic templates, new library components and more. The talk will show how some of the new features and also existing features can be employed to simplify C++ code and say more with less. It will also touch some parts of Boost, especially boost/operators.hpp, that haven't been obsoleted by C++11 to show how to get even simpler code when needed for the examples.

Speaker: Peter Sommerlad

Slides & Extended Version with more examples


Go back