Lectures
The slides that I show during the lectures will appear below as the course proceeds.
The lectures are on Wednesdays, 10–12, MA:3, and Thursdays, 13–15, E:C.
Note that the lecture slides contain topics and suggested reading for the following lecture.
# | Subject | Slides |
---|---|---|
L1 | Introduction: functions | slides |
L2 | Introduction cont'd: data types and variables | slides |
L3 | Modularity: source code organization and error handling | slides |
L4 | Classes | slides |
L5 | Resource management | slides |
L6 | Generic programming: standard algorithms and iterators | slides |
L7 | Templates and function objects | slides |
L8 | Classes and inheritance | slides |
L9 | More about resource management and the standard library | slides |
L10 | Examples. More about the standard library | slides |
L11 | Low level details and loose ends | slides |
L12 | Recap and about the project | slides |
L13, L14 | no lecture |
Examples
Lecture 2:
object_value.cc : a small example demonstrating how the same object can be interpreted as different types.
Lecture 6:
print.cc : a minimal function template example
Lecture 9:
example_copying.cc : example of resource management for containers
stack.cc : example of private inheritance and allocation behaviour of std::vector
and std::deque
example_adl.cc : an example of argument dependent lookup (ADL)
Lecture 10:
ratio.cc : example of compile_time rational numbers using std::ratio
ref.cc : example of the standard reference wrapper and std::ref
meta.cc : example of compile-time computation of n!
variadic.cc : example of a variadic template
enable_if.cc : example of metaprogramming for selecting which overload to be used for a particular type