@@ -4,9 +4,7 @@ $(SPEC_S Functions,
4
4
5
5
$(HEADERNAV_TOC)
6
6
7
- $(H2 $(LNAME2 grammar, Grammar))
8
-
9
- $(H3 Function declaration)
7
+ $(H2 $(LNAME2 grammar, Function Declarations))
10
8
11
9
$(GRAMMAR
12
10
$(GNAME FuncDeclaration):
@@ -24,7 +22,12 @@ $(GNAME FuncDeclaratorSuffix):
24
22
$(GLINK2 template, TemplateParameters) $(GLINK Parameters) $(GLINK MemberFunctionAttributes)$(OPT) $(GLINK2 template, Constraint)$(OPT)
25
23
)
26
24
27
- $(H3 Parameters)
25
+ * A *FuncDeclaration* with a $(GLINK FunctionBody) is called a *function definition*.
26
+ * A *FuncDeclaration* with *TemplateParameters* defines a
27
+ $(DDSUBLINK spec/template, function-templates, function template).
28
+
29
+
30
+ $(H3 Function Parameters)
28
31
29
32
$(GRAMMAR
30
33
$(GNAME Parameters):
@@ -76,7 +79,7 @@ $(NOTE In D2, declaring a parameter `final` is a semantic error, but not a parse
76
79
77
80
$(P See also: $(RELATIVE_LINK2 param-storage, parameter storage classes).)
78
81
79
- $(H3 Function attributes )
82
+ $(H3 Function Attributes )
80
83
81
84
$(GRAMMAR
82
85
$(GNAME FunctionAttributes):
@@ -131,8 +134,6 @@ $(LEGACY_LNAME2 FunctionLiteralBody)
131
134
$(DDSUBLINK spec/statement, ReturnStatement, return statement).
132
135
This syntax also applies for $(DDSUBLINK spec/expression, function_literals, function literals).)
133
136
134
- $(P $(B Note:) The *ShortenedFunctionBody* form requires the `-preview=shortenedMethods`
135
- command-line switch, which is available starting in v2.096.0.)
136
137
137
138
$(H3 $(LNAME2 function-declarations, Functions without Bodies))
138
139
0 commit comments