Lecture 6
LECTURE 6:
The Standard Library and Metaprogramming
Kurt Nørmark
Department of Computer Science, Aalborg University
Title page
Abstract
References from this lecture
Exercises in this lecture
Source programs in this lecture
Page 1
Iterators
Page 21
Function objects
Page 2
Iterators seen as generalized pointers
Page 22
Using the sort algorithm
Page 3
Example uses of iterators - basic stuff
Page 23
An example of for-each and function objects
Page 4
Different classifications of iterators
Page 24
Use of function objects in STL
Page 5
Categories of iterators
Page 25
Adapter examples
Page 6
Insert iterators
Page 26
Generic Programming and Metaprogramming
Page 7
Standard Containers
Page 27
What is generic programming in C++?
Page 8
Documentation of the container library
Page 28
What is metaprogramming in C++?
Page 9
Overview of containers
Page 29
What is metaprogramming used for in C++?
Page 10
Common properties of containers
Page 30
Static assert
Page 11
A priority queue example
Page 31
Type functions
Page 12
A map example
Page 32
Constant expressions in C++11
Page 13
Container member types
Page 33
Examples of constant expressions
Page 14
Member types - ambiguities
Page 34
Selection between two types
Page 15
A vector specialization: vector<bool>
Page 35
Selection between two functions
Page 16
Algorithms
Page 36
Conditional declarations
Page 17
Documentation of the algorithms library
Page 37
Example of type function: Integer of given byte size
Page 18
Overview of Algorithms
Page 38
Generalizing Select with use of a variadic template
Page 19
Principles used for algorithms
Page 39
Compile Time iteration
Page 20
The for-each algorithm
Page 40
More compile time computations - older stuff
Generated: Tuesday August 1, 2017, 13:31:59