Skip to content

Commit fab6f7f

Browse files
[dcl.fct] Integrate return type requirements from [expr.call] and simplify them (#4113)
There is a general prohibition against arrays of function type in [dcl.array]. There is no need to highlight some specific permitted types; it is sufficient to state the general rule.
1 parent 55c0930 commit fab6f7f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

source/declarations.tex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3605,10 +3605,7 @@
36053605
\pnum
36063606
\indextext{function return type|see{return type}}%
36073607
\indextext{return type}%
3608-
Functions shall not have a return type of type array or function,
3609-
although they may have a return type of type pointer or reference to such things.
3610-
There shall be no arrays of functions, although there can be arrays of pointers
3611-
to functions.
3608+
The return type shall be a non-array object type, a reference type, or \cv{}~\tcode{void}.
36123609

36133610
\pnum
36143611
A volatile-qualified return type is deprecated;

source/expressions.tex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3045,7 +3045,6 @@
30453045
statically chosen function (i.e., ignoring the \tcode{virtual} keyword),
30463046
even if the type of the function actually called is different.
30473047
\indextext{type!incomplete}%
3048-
This return type shall be an object type, a reference type or \cv{}~\tcode{void}.
30493048
If the \grammarterm{postfix-expression} names a pseudo-destructor
30503049
(in which case the \grammarterm{postfix-expression}
30513050
is a possibly-parenthesized class member access),

0 commit comments

Comments
 (0)