Lecture 5 - Slide 37 : 40
Example of Policies with Templates

We parameterize class Point with a 'policy for distance and comparison'

prog.cc
Class Point parameterized with a policy class.
prog-output
Program output.
norms.cc
Four different policy classes - with type parameterized static methods.
point.h
The Point class template definition - policy parameterized.
point.cc
Member functions in class Point.

Below we parameterize individual functions with a policy

prog.cc
Two Point functions parameterized with a policy class.
prog-output
Program output.
norms.cc
Four different policy classes - with type parameterized static methods.
point.h
The Point class definition - not a template in this version.
point.cc
Member functions in class Point - not essential to this example.