isVersionSemanticallyCompatible#
Fully qualified name: carb::isVersionSemanticallyCompatible
Defined in carb/Version.h
- inline bool carb::isVersionSemanticallyCompatible( )#
Checks two versions to see if they are semantically compatible.
For more information on semantic versioning, see https://semver.org/.
Warning
A major version of
0is considered to be the “development/experimental” version and0.xminor versions may be but are not required to be compatible with each other. This function will considerminimumversion0.xto be semantically compatible to differentcandidateversion0.y, but will emit a warning tostderrif anameis provided.- Parameters:
name – An optional name that, if provided, will enable the warning message to
stderrfor0.xversions mentioned above.minimum – The minimum version required. This is typically the version being tested.
candidate – The version offered. This is typically the version being tested against.
- Return values:
true – If
minimumandcandidateshare the same major version andcandidatehas a minor version that is greater-than or equal to the minor version inminimum.false – If
minimumandcandidatehave different major versions orcandidatehas a minor version that is lower than the minor version requested inminimum.