We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e7bb21 commit 310812aCopy full SHA for 310812a
src/const_eval.md
@@ -0,0 +1,21 @@
1
+# Constant evaluation
2
+
3
+Constant evaluation is the process of computing the result of
4
+[expressions] during compilation.
5
6
+## Const context
7
8
+A _const context_ is one of the following:
9
10
+* [array type length expressions]
11
+* repeat expression length expessions
12
+* the initializer of
13
+ * [constants]
14
+ * [statics]
15
+ * [enum discriminants]
16
17
+[array type length expressions]: types.html#array-and-slice-types
18
+[enum discriminants]: items/enumerations.html#custom-discriminant-values-for-field-less-enumerations
19
+[constants]: items/constant-items.html
20
+[statics]: items/static-items.html
21
+[expressions]: expressions.html#constant-expressions
0 commit comments