Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, we introduced the Standard Template Library and discussed its three key components—containers, iterators and algorithms. You learned the STL sequence containers, vector, deque and list, which represent linear data structures. We discussed associative containers, set, multiset, map and multimap, which represent nonlinear data structures. You also saw that the container adapters stack, queue and priority_queue can be used to restrict the operations of the sequence containers for the purpose of implementing the specialized data structures represented by the container adapters. We then demonstrated many of the STL algorithms, including mathematical algorithms, basic searching and sorting algorithms and set operations. You learned the types of iterators each algorithm requires and that each algorithm can be used with any container that supports the minimum iterator functionality the algorithm requires. You also learned class bitset, which makes it easy to create and manipulate bit sets as a container. Finally, we introduced function objects that work syntactically and semantically like ordinary functions, but offer advantages such as performance and the ability to store data.
The next chapter discusses the new version of the C++ standard, known as C++0x, which will be released in 2011 or 2012. You’ll learn about the new libraries and core language features being added to C++.