Sessions on advanced C++ programming
Half-day seminar at CCC
Author: Zoltán Porkoláb
Budapest, 2007
A.6. STL fundamentals
Topics
Sequential containers
Standard types in containers
Iterators and references
Access of elements
Constructors and assignments
Stack operations
List operations
Size and capacity
Swap and equality
Sequential adapters
Adapters: stack
Adapters: queue
Adapters: priority queue
Associative containers
Map: types and iterators
Map constructor
Map: usage of compare
Map: element access
Map: list operations
Map: special operations
Function objects
Function objects
Binders
Member function adapter
Negater
Nonmodifying sequential algorithms
For_each
Find
Count
Equal
Search
Modifying sequential algorithms
Replace
Transform
Remove
Unique
Copy
Fill and generate
Sorted container algorithms
Sort
Reverse
Binary search
Heap
Swap
Minimum and maximum
Merge
Problems, issues
Issue of compare object
Specifying sorting criterion at runtime
Use STL in the adequate way
When to use which container
Associative containers are not allways better
Iterators
Iterator categories
Iterator functions, iterator traits
Iterator example
Case studies: Markov chain
Weather forecast
Case studies: Merge
Procedural version
Naive STL
Inserter
Stream iterators
Case insensitive
Functor
Other Functor