C++11 Standard

Image

The new C++11 standard, published in 2011, motivated us to write C++11 for Programmers. Throughout the book, each new C++11 feature we discuss is marked with the “11” icon you see here in the margin. These are some of the key C++11 features of this new edition:

Conforms to the new C++11 standard. Extensive coverage of many of the key new C++11 features (Fig. 1).

Code thoroughly tested on three popular industrial-strength C++11 compilers. We tested the code examples on GNU™ C++ 4.7, Microsoft® Visual C++® 2012 and Apple® LLVM in Xcode® 4.5.

Smart pointers. Smart pointers help you avoid dynamic memory management errors by providing additional functionality beyond that of built-in pointers. We discuss unique_ptr in Chapter 17, and shared_ptr and weak_ptr in Chapter 24.

Image

Fig. 1. A sampling of C++11 features in C++11 for Programmers.

Earlier coverage of template-based Standard Library containers, iterators and algorithms, enhanced with C++11 capabilities. We moved the treatment of Standard Library containers, iterators and algorithms from Chapter 20 in the previous edition to Chapters 15 and 16 and enhanced it with new C++11 features. The vast majority of your data structure needs can be fulfilled by reusing these Standard Library capabilities.

Online Chapter 24, C++11: Additional Topics. In this chapter, we present additional C++11 topics. The new C++11 standard has been available since 2011, but not all C++ compilers have fully implemented the features. If all three of our key compilers already implemented a particular C++11 feature at the time we wrote this book, we generally integrated a discussion of that feature into the text with a live-code example. If any of these compilers had not implemented that feature, we included a bold italic heading followed by a brief discussion of the feature. Many of those discussions will be expanded in online Chapter 24 as the features are implemented. Placing the chapter online allows us to evolve it dynamically. This chapter includes discussions of regular expressions, the shared_ptr and weak_ptr smart pointers, move semantics and more. You can access this chapter at:

Random Number generation, simulation and game playing. To help make programs more secure (see Secure C++ Programming on the next page), we now discuss C++11’s new non-deterministic random-number generation capabilities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.107.31