/* Copyright (c) 1992 by AT&T Bell Laboratories. */ /* Advanced C++ Programming Styles and Idioms */ /* James O. Coplien */ /* All rights reserved. */ template class List { }; template class Set { public: void add(const ElementType& e) { if (!rep.element(e)) rep.add(e); } ElementType get() { return rep.get; } void remove(const ElementType&); int exists(const ElementType& e) const { return rep.element(e); } Set Union(const Set&) const; Set Intersection(const Set&) const; int size() const { return rep.size(); } void sort() { rep.sort(); } private: List rep; };