lunduniversity.lu.se

Computer Science

Faculty of Engineering, LTH

Denna sida på svenska This page in English

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
L2Introduction cont'd: data types and variablesslides
L3Modularity: source code organization and error handlingslides
L4Classesslides
L5Resource managementslides
L6Generic programming: standard algorithms and iteratorsslides
L7

Templates and function objects

slides
L8Classes and inheritanceslides
L9More about resource management and the standard libraryslides
L10

Examples. More about the standard library

slides
L11

Low level details and loose ends

slides
L12Recap 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