SemVer.compare

int compare(const SemVer other) const

Compares this SemVer to another according to semver precedence rules.

Returns

-1 if this < other, 0 if equal, 1 if this > other.

Build metadata is ignored for precedence.