DoxigAlpha

isAtLeast

Checks if system is guaranteed to be at least version or older than version. Returns null if a runtime check is required.

Function parameters

Parameters

#
ver:switch (tag.versionRangeTag()) { .none => void, .semver, .hurd, .linux => std.SemanticVersion, .windows => WindowsVersion, }

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
requiresLibC
Does this target require linking libc? This may be the case if the target has an unstable
cCharSignedness
Default signedness of `char` for the native C compiler for this target

Source

Implementation

#
pub inline fn isAtLeast(os: Os, comptime tag: Tag, ver: switch (tag.versionRangeTag()) {
    .none => void,
    .semver, .hurd, .linux => std.SemanticVersion,
    .windows => WindowsVersion,
}) ?bool {
    return if (os.tag != tag) false else switch (tag.versionRangeTag()) {
        .none => true,
        inline .semver,
        .hurd,
        .linux,
        .windows,
        => |field| @field(os.version_range, @tagName(field)).isAtLeast(ver),
    };
}