In this chapter we introduce new syntax and functionality in C++ that adds value to the language as a worthy successor to C++03. We discuss the features that promote the run-time efficiency, reliability and usability of code, namely:
The features in this chapter are crucial as they represent best practices when writing C++ code. For this reason we introduce these features early on in the book. We also strongly recommend that you do the exercises in this chapter to become acquainted with the new features as soon as possible.
In this chapter we first introduce (as background) the Boost Smart Pointer library that makes object lifecycle management easier when compared to using the new and delete operators in C++. In particular, the responsibility for removing objects from memory is taken from the developer's shoulders. To this end, we discuss a number of classes that improve the reliability of C++ code. The two most important classes are: