Base module
Version
Semantic version number with major, minor, and patch fields.
Version
#include <icy/util.h>Semantic version number with major, minor, and patch fields.
Public Attributes
major
int majorminor
int minorrevision
int revisionbuild
int buildPublic Methods
| Return | Name | Description |
|---|---|---|
Version inline | Parses a dot-separated version string into up to four numeric fields. Unspecified fields default to 0. Examples: "1.2.3", "2.0", "3.7.8.0". | |
bool | operator< inline | Returns true if this version is strictly less than other. Compares fields in major, minor, revision, build order. |
bool | operator== const inline | Returns true if all four version fields are equal. |
Version
inline
inline Version(std::string_view version)Parses a dot-separated version string into up to four numeric fields. Unspecified fields default to 0. Examples: "1.2.3", "2.0", "3.7.8.0".
Parameters
versionDot-separated version string.
operator<
inline
inline bool operator<(const Version & other)Returns true if this version is strictly less than other. Compares fields in major, minor, revision, build order.
Parameters
otherVersion to compare against.
Returns
true if this < other.
operator==
const inline
inline bool operator==(const Version & other) constReturns true if all four version fields are equal.
Parameters
otherVersion to compare against.
Returns
true if this == other.
