Skip to content

SVersion

Jay edited this page Oct 3, 2026 · 2 revisions

SVersion

#include <certpp/version.hpp> --- certpp

Represents a version with major, minor, and patch components.

Fields

  • uint32_t major
  • uint32_t minor
  • uint32_t patch

Methods

constexpr SVersion(uint32_t maj = 0, uint32_t min = 0, uint32_t pat = 0)

Constructs an SVersion with the specified major, minor, and patch components.

bool operator==(const SVersion& other) const

Compares this version with another version for equality.

  • other --- The other version to compare with.

Returns: true if all components (major, minor, patch) are equal, false otherwise.

bool operator!=(const SVersion& other) const

Compares this version with another version for inequality.

  • other --- The other version to compare with.

Returns: true if any component (major, minor, patch) is different, false otherwise.

bool operator<(const SVersion& other) const

Compares this version with another version to determine if it is less than the other version.

  • other --- The other version to compare with.

Returns: true if this version is less than the other version, false otherwise.

bool operator>(const SVersion& other) const

Compares this version with another version to determine if it is greater than the other version.

  • other --- The other version to compare with.

Returns: true if this version is greater than the other version, false otherwise.

bool operator<=(const SVersion& other) const

Compares this version with another version to determine if it is less than or equal to the other version.

  • other --- The other version to compare with.

Returns: true if this version is less than or equal to the other version, false otherwise.

bool operator>=(const SVersion& other) const

Compares this version with another version to determine if it is greater than or equal to the other version.

  • other --- The other version to compare with.

Returns: true if this version is greater than or equal to the other version, false otherwise.

Example

Compares the header the caller compiled against with the library actually loaded.

SVersion lib = GetLibraryVersion();
if (lib != HEADER_VERSION) {
    // built against one version of the headers, linked against another
}

Reference generated from certpp/version.hpp at commit 0834b29 (v1.0.1). The header is authoritative --- if this page disagrees with it, the header is right and this page needs regenerating.

Clone this wiki locally