39 Version(uint32_t major, uint32_t minor, uint32_t subminor, uint32_t patch);
95 return std::tie(other.m_major, other.m_minor, other.m_subminor, other.m_patch)
96 == std::tie(this->m_major, this->m_minor, this->m_subminor, this->m_patch);
109 return !(*
this == other);
124 return std::tie(this->m_major, this->m_minor, this->m_subminor, this->m_patch)
125 < std::tie(other.m_major, other.m_minor, other.m_subminor, other.m_patch);
138 return other < *
this;
152 return os << version.m_major <<
'.' << version.m_minor <<
'.' << version.m_subminor <<
'.' << version.m_patch;
164 std::ostringstream ss;
170 std::uint32_t m_major{};
171 std::uint32_t m_minor{};
172 std::uint32_t m_subminor{};
173 std::uint32_t m_patch{};
179 , m_subminor{ subminor }
Version(uint32_t major, uint32_t minor, uint32_t subminor, uint32_t patch)
Definition peak_common_version.hpp:176
friend std::ostream & operator<<(std::ostream &os, Version version)
Outputs the version in dot-separated string format (e.g., "1.2.3.4").
Definition peak_common_version.hpp:150
PEAK_COMMON_NO_DISCARD uint32_t GetPatch() const
Retrieves the patch version component.
Definition peak_common_version.hpp:198
PEAK_COMMON_NO_DISCARD bool operator<(const Version &other) const
Checks if this version is less than another version.
Definition peak_common_version.hpp:122
PEAK_COMMON_NO_DISCARD uint32_t GetMinor() const
Retrieves the minor version component.
Definition peak_common_version.hpp:188
PEAK_COMMON_NO_DISCARD bool operator==(const Version &other) const
Checks if two versions are equal.
Definition peak_common_version.hpp:93
PEAK_COMMON_NO_DISCARD uint32_t GetSubminor() const
Retrieves the subminor version component.
Definition peak_common_version.hpp:193
PEAK_COMMON_NO_DISCARD std::string ToString() const
Converts the version to its string representation (e.g., "1.2.3.4").
Definition peak_common_version.hpp:162
PEAK_COMMON_NO_DISCARD uint32_t GetMajor() const
Retrieves the major version component.
Definition peak_common_version.hpp:183
PEAK_COMMON_NO_DISCARD bool operator>(const Version &other) const
Checks if this version is greater than another version.
Definition peak_common_version.hpp:136
PEAK_COMMON_NO_DISCARD bool operator!=(const Version &other) const
Checks if two versions are not equal.
Definition peak_common_version.hpp:107
#define PEAK_COMMON_NO_DISCARD
Compatability macro for the nodiscard attribute.
Definition peak_common_defines.hpp:91
Root namespace for common types and interfaces shared across multiple libraries.
Definition peak_common_math.hpp:22
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33