Lecture overview -- Keyboard shortcut: 'u'  Source programs in previous lecture -- Keyboard shortcut: 'p'  Source programs in next lecture -- Keyboard shortcut: 'n'  Course home

Source Programs
Templates and The Standard Library

The Note Context in the rightmost column is only shown in case an annotated program exists. - You can navigate to the annotated program via the annotated slide view (= 'the note context').

A type parameterized variant of class Point - point.h.point.hSlide context--
The implementation of the template class Point - point.cc.point.ccSlide context--
A program that illustrate template instantiation.prog.ccSlide context--
A type parameterized variant of class Point - point.h.point.hSlide context--
The implementation of the template class Point - point.cc.point.ccSlide context--
A program that illustrate the template instantiation.prog.ccSlide context--
The template function compare, and various uses of it.cmp.ccSlide context--
Class Point with comparison operator friends.point.hSlide context--
The implementation of class Point.point.ccSlide context--
The template function compare used for Point comparison.cmp.ccSlide context--
The Point class definition - a template - policy parameterized.point.hSlide context--
Member functions in class Point.point.ccSlide context--
Four different policy classes - with type parameterized static methods.norms.ccSlide context--
A sample application.prog.ccSlide context--
The Point class definition - not a template in this version.point.hSlide context--
Member functions in class Point - not essential to this example.point.ccSlide context--
Four different policy classes - with type parameterized static methods.norms.ccSlide context--
A sample application - together with policy parameterized functions.prog.ccSlide context--
The general class template Point followed by the specialized one.point.hSlide context--
The implementation of the template class Point - point.cc - nothing interesting here.point.ccSlide context--
A program that illustrate the instantiation of both the general and specialized template classes.prog.ccSlide context--
Full and partial specializations of a class template A.prog.cppSlide context--
The factorial function - from Wikipedia.fak1.cppSlide context--
The power function on integer type arguments.pow1.cppSlide context--
The power function on integer type arguments - alternative implementation with an enumeration constant.pow1a.cppSlide context--
A more advanced version of the power function - from Stack Overflow.pow3.cppSlide context--
A variant of the more advanced version of the power function.pow4.cppSlide context--
A really simple example of iterators.it-1.cppSlide context--
The same program using a reverse iterator.rit-1.cppSlide context--
Output insert-iterators and factory functions that create such iterators.ins-2.cppSlide context--
Class point with an overloaded operator<.point.hSlide context--
The implementation of class Point and in particular operator<.point.ccSlide context--
Illustration of priority_queue<Point, deque<Point> >.pri-queue-1.cppSlide context--
Illustration of the map standard container.map-1.cppSlide context--
Illustration of the use of member types for a list of chars.mem-types-1.cppSlide context--
Same program - now with use of typename as prefix of 'nested dependent type names'.mem-types-2.cppSlide context--
Illustration of a couple of ambiguities.ambiguities-1.cppSlide context--
Ambiguities resolved.ambiguities-2.cppSlide context--
Illustration of the use of vector<bool>.veb-bool-1.cppSlide context--
A possible implementation of the for-each algorithm.for-each-reproduction-1.cppSlide context--
Implementation and sample use of for-each on a list of integers.for-each-reproduction-2.cppSlide context--
Class Point with overloadings of the application operator.point.hSlide context--
Definition of Point application operators.point.ccSlide context--
Sample uses of the application operators - Funny and artificial.prog.ccSlide context--
Class Point with another overloading of the application operator.point.hSlide context--
Definition of then Point application operator.point.ccSlide context--
Sample uses of the application operators - slightly more realistic.prog.ccSlide context--
Two overloads of the sort function template.sort-signaturesSlide context--
Sorting a vector of integers.prog-1.cppSlide context--
A possible use of for-each to solve this problem.for-each-1.cppSlide context--
Following the advice: Solve the problem with a more appropriate algorithm.adjacent-1.cppSlide context--
The type greater and its base class.greater-and-binary-function.cppSlide context--
An illustration of plus<double>.plus-1.cppSlide context--
A possible definition of plus.plus-3.cppSlide context--
Another definition of plus - as a function template.plus-4.cppSlide context--
Use of member function adaption, with mem_fun_ref.memb-adapt-1.cppSlide context--
The definition of Point - point.h.point.hSlide context--

Generated: Tuesday March 26, 2013, 13:03:52