Function isAtLeast [src]

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

Prototype

pub inline fn isAtLeast(os: Os, comptime tag: Tag, ver: switch (tag.versionRangeTag()) { .none => void, .semver, .hurd, .linux => std.SemanticVersion, .windows => WindowsVersion, }) ?bool

Parameters

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

Source

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), }; }