Struct Version

Struct Documentation

struct Version

Version structure.

Public Types

enum class PreReleaseType : uint16_t

Values:

enumerator ALPHA
enumerator BETA
enumerator RC
enumerator NONE

Public Functions

explicit Version(const std::string &v)

Construct Version from string.

Version(unsigned major, unsigned minor, unsigned patch, const PreReleaseType &type = PreReleaseType::NONE, const std::optional<uint16_t> &preReleaseVersion = std::nullopt, const std::string &buildInfo = "")

Construct Version major, minor, patch, and pre-release information.

inline Version(unsigned major, unsigned minor, unsigned patch, const std::string &buildInfo)
bool operator==(const Version &other) const
bool operator<(const Version &other) const
inline bool operator!=(const Version &rhs) const
inline bool operator>(const Version &rhs) const
inline bool operator<=(const Version &rhs) const
inline bool operator>=(const Version &rhs) const
std::string toString() const

Convert Version to string.

std::string toStringSemver() const

Convert Version to semver (no build information) string.

std::string getBuildInfo() const

Get build info.