-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
I'm sure this was mentioned somewhere but could not find an issue: The gist is as follows:
if (@areWeInComptime()) {
// use a slow fallback which we can compute in zig
} else {
// use a fast runtime version that uses assembly (or features not supported at comptime)
}
This is present in D for example via the __ctfe variable. The current reason I need this is that I want to call sqrt at compile-time but on x86_64 this uses an assembly routine which can not be evaluated at compile-time.
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.