Template Class SemanticVersion#

Class Documentation#

template<u32 major, u32 minor, u32 patch>
class SemanticVersion#

Semantic version.

Template Parameters:
  • major – Major version number.

  • minor – Minor version number.

  • patch – Patch version number.

Public Functions

inline explicit consteval SemanticVersion(const std::optional<std::string_view> preReleaseIdentifier = std::nullopt, const std::optional<std::string_view> metadataIdentifier = std::nullopt) noexcept#

Constructor.

Parameters:
  • preReleaseIdentifierOptional: Pre release identifier.

  • metadataIdentifierOptional: Metadata identifier.

consteval SemanticVersion(const SemanticVersion&) noexcept = delete#

Copy constructor.

consteval SemanticVersion(SemanticVersion&&) noexcept = default#

Move constructor.

consteval SemanticVersion &operator=(const SemanticVersion&) noexcept = delete#

Copy assignment operator.

consteval SemanticVersion &operator=(SemanticVersion&&) noexcept = default#

Move assignment operator.

constexpr ~SemanticVersion() = default#

Destructor.

inline consteval u32 GetPackedVersion() const noexcept#

Retrieve packed version.

Returns:

Packed version.

inline consteval u32 Major() const noexcept#

Extract major version.

Returns:

Major version number.

inline consteval u32 Minor() const noexcept#

Extract minor version.

Returns:

Minor version number.

inline consteval u32 Patch() const noexcept#

Extract patch version.

Returns:

Patch version number.

inline constexpr std::optional<std::string_view> PreReleaseIdentifier() const noexcept#

Extract the pre release identifier.

Returns:

Pre release identifier.

inline constexpr std::optional<std::string_view> MetadataIdentifier() const noexcept#

Extract the metadata identifier.

Returns:

Metadata identifier.