#How does one determine if something will or will not be executed at comptime?

1 messages · Page 1 of 1 (latest)

upper linden
#

Can I force an expression to be executed at comptime, and error if it is not possible?

untold panther
#

comptime expr will run at comptime or compiler error

upper linden
#

ok that's perfect

untold panther
#

so if (comptime myFunction()) { ... }

upper linden
#

that's wonderful, thank you

#

can we do comptime if...?

untold panther
#

there are also comptime blocks

comptime {
   // this must be comptime or error
}