All expressions have a value stage which dictate which stage of compilation it may be used in.
Constexpr values are values that are known at compile-time and can be used as constexpr expressions. Anywhere that requires a comptime or a runtime value also accept constexpr values.
The following are constexpr expressions:
literalsdef variablesComptime values are values that may be used inside a constexpr function but are not constexpr themselves. Anywhere that requires a runtime values also accept comptime values.
The following are comptime expressions:
const variablesconst variables defined in a constexpr functionvar variables defined in a constexpr functionRuntime values are values that may only be used at runtime as they are not known and/or cannot be calculated at compile-time. Anywhere that that requires a runtime value also accept comptime and constexpr values.
The following are runtime expressions:
var variablesvar variables and const variables declared in function scope