int (SemVer other) { int diff = myMajor - other.myMajor; if (diff != 0) return diff; diff = myMinor - other.myMinor; if (diff != 0) return diff; diff = myPatch - other.myPatch; if (diff != 0) return diff; return comparePrerelease(myPreRelease, other.myPreRelease); }