File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 256
256
\end {codeblock }
257
257
\end {example }
258
258
259
+ \pnum
260
+ \indextext {initialization!definition and}%
261
+ An object definition causes
262
+ storage of appropriate size and alignment to be reserved and
263
+ any appropriate initialization\iref {dcl.init } to be done.
264
+
259
265
\pnum
260
266
\indextext {definition!declaration as}%
261
267
Syntactic components beyond those found in the general form of
262
268
\grammarterm {simple-declaration} are added to a function declaration to make a
263
269
\grammarterm {function-definition}. An object declaration, however, is also
264
270
a definition unless it contains the \keyword {extern} specifier and has no
265
271
initializer\iref {basic.def }.
266
- \indextext {initialization!definition and}%
267
- An object definition causes storage of appropriate size and alignment to be reserved and
268
- any appropriate initialization\iref {dcl.init } to be done.
272
+ A token sequence starting with \tcode {\{ } or \tcode {=}
273
+ is treated as a \grammarterm {function-body}\iref {dcl.fct.def.general }
274
+ if the type of the \grammarterm {declarator-id}\iref {dcl.meaning.general }
275
+ is a function type, and
276
+ is otherwise
277
+ treated as a \grammarterm {brace-or-equal-initializer}\iref {dcl.init.general }.
278
+ \begin {note }
279
+ If the declaration acquires a function type through template instantiation,
280
+ the program is ill-formed; see \ref {temp.spec.general }.
281
+ The function type of a function definition
282
+ cannot be specified with a \grammarterm {typedef-name}\iref {dcl.fct }.
283
+ \end {note }
269
284
270
285
\pnum
271
286
A \grammarterm {nodeclspec-function-declaration} shall declare a
You can’t perform that action at this time.
0 commit comments