Discovered there is a std::ratio in C++11 std library so replaced rational::Rational with this in namespace dims.