A class representing semantic versions (https://semver.org/). Does not include build metadata or prerelease comparisons.
More...
A class representing semantic versions (https://semver.org/). Does not include build metadata or prerelease comparisons.
◆ semantic_version() [1/2]
| arene::base::semantic_version::semantic_version |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ semantic_version() [2/2]
|
|
inlineexplicitconstexprnoexcept |
Constructs a semantic_version with the given major, minor, and patch version.
- Parameters
-
| major_version | The major version number. |
| minor_version | The minor version number. |
| patch_version | The patch version number. |
- Postcondition
major() == major_version
-
minor() == minor_version
-
patch() == patch_version
◆ is_unstable()
| ARENE_NODISCARD constexpr auto arene::base::semantic_version::is_unstable |
( |
| ) |
const -> bool |
|
inlineconstexprnoexcept |
Tests whether this semantic version represents an "unstable" entity, which is one with a major of 0.
- Returns
- true iff
major() == 0
-
false otherwise
◆ major()
Get the major version component.
- Returns
- major version number
◆ minor()
Get the minor version component.
- Returns
- minor version number
◆ patch()
Get the patch version component.
- Returns
- patch version number
◆ three_way_compare()
Implements a strong lexicographic sort order based on [major, minor, path], in that order.
- Parameters
-
| left | The left hand side of the comparison. |
| right | The right hand side of the comparison. |
- Returns
- strong_ordering::less if lhs lexicographically precedes rhs.
-
strong_ordering::equal if lhs and rhs are equal across major, minor, and patch.
-
strong_ordering::less if lhs lexicographically follows rhs.
The documentation for this class was generated from the following file: