Basic Structure

C++ provides class templates in order to create generic classes that can work with any data type.

In this lab, you will implement a Pair class template. This is similar to what was discussed in lecture (although that was a template with two type parameters).

A Pair is a data structure that holds two objects of any specified type. It provides a default constructor, a two-argument constructor, and accessors for the two data members, called first() and second(). It must also have an overloaded operator==() that compares two Pair objects in an order-independent fashion; in other words, they are equal if (a.first == b.first and a.second == b.second) or (a.first == b.second and a.second == b.first).