Templates: overall idea
Instead of having a single type InSeq to represent integer input sequences only, we define a family of types:
template <class T> class InSeq {
public:
virtual bool avail() = 0;
virtual T next() = 0;
virtual ~InSeq() { }
};
Previous slide
Next slide
Back to first slide
View graphic version