Skip to content

proposal: isComptime builtin. #7539

Closed
Closed
@lolbinarycat

Description

@lolbinarycat

currently (as far as I know), there is no simple to get whether a value is known at compile time. For integer types, you can do @TypeOf(@clz(u8, val)) == comptime_int, but this is really more of a hack. Since this check already exists as part of @clz, it shouldn't be hard to implement into zig.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions