DoxigAlpha

hasAny

Returns true if any feature in features is enabled.

Function parameters

Parameters

#
family:Arch.Family
features:[]const @field(Target, @tagName(family)).Feature

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 fn hasAny(cpu: Cpu, comptime family: Arch.Family, features: []const @field(Target, @tagName(family)).Feature) bool {
    if (family != cpu.arch.family()) return false;
    for (features) |feature| {
        if (cpu.features.isEnabled(@intFromEnum(feature))) return true;
    }
    return false;
}