62 lhs.get_major() ==
rhs.get_major() &&
63 lhs.get_minor() ==
rhs.get_minor() &&
64 lhs.get_patch() ==
rhs.get_patch();
74 bool operator<(
const version &lhs,
const version &rhs)
noexcept
76 if (lhs.get_major() != rhs.get_major())
78 return lhs.get_major() < rhs.get_major();
80 if (lhs.get_minor() != rhs.get_minor())
82 return lhs.get_minor() < rhs.get_minor();
84 return lhs.get_patch() < rhs.get_patch();
88 bool operator<=(
const version &lhs,
const version &rhs)
noexcept
94 bool operator>(
const version &lhs,
const version &rhs)
noexcept
100 bool operator>=(
const version &lhs,
const version &rhs)
noexcept
105 template <
typename T>
106 friend std::basic_ostream<T>&
107 operator<<(std::basic_ostream<T> &os,
const version &ver)
110 << ver.get_major() <<
'.'
111 << ver.get_minor() <<
'.'
116 std::uint32_t m_major;
117 std::uint32_t m_minor;
118 std::uint32_t m_patch;
123#include "version.inl"
A view of a contiguous sequence of elements.
Definition span.hpp:29
A version number of three components.
Definition version.hpp:18
constexpr std::uint32_t get_patch() const noexcept
Get the patch component.
constexpr std::uint32_t get_major() const noexcept
Get the major component.
constexpr std::uint32_t get_minor() const noexcept
Get the minor component.
constexpr version(std::uint32_t major, std::uint32_t minor, std::uint32_t patch) noexcept
Construct a version from its components.