To begin: what do we need? What are units? All SI units (which
is what we'll do here) can be expressed as a numerator and a
denominator, where each is made up of a combination of orthogonal
symbols, representing the different units (i.e. seconds, meters,
etc.).

We definitely need a template class representing a unit, because
there are infinitely many combinations of these units, and we want
to be able to combine them. From the previous paragraph, we probably
want two template parameters, one for the numerator and one for the
denominator. But what data type should these be? Another sort of
class? It would seem so, but....

Oh, no. It seems we have run in to a little predicament. There
is no way we are going to get C++ to factor numbers at
compile time! It's actually not a problem, as we don't need to know
what the constitutent basic elements are, just whether they are
equal. And for that, we need to reduce our two numbers into lowest
terms. And for that, we need a GCD function: