Created on 1999-07-01.00:00:00 last changed 263 months ago
Proposed resolution (10/00): Replace the last sentence of 9.3.4.6 [dcl.fct] paragraph 6 with
The type of a parameter or the return type for a function definition shall not be an incomplete class type (possibly cv-qualified) unless the function definition is nested within the member-specification for that class (including definitions in nested classes defined within the class).
6.3 [basic.def.odr] paragraph 4 and 9.3.4.6 [dcl.fct] paragraph 6 indicate that the return type and parameter types must be complete in a function definition. However, when 11.4 [class.mem] paragraph 2 lists the contexts in a class member-specification in which the class is considered complete, the return type and parameter types of a member function defined in the class definition are not included. It thus appears that the following example is ill-formed:
struct S { S f() { return S(); } // error: incomplete return type void g(S) { } // error: incomplete parameter type };Jack Rouse: I suggest supplementing the text in 8.3.5p6 with something like:
The type of a parameter or the return type for a function definition shall not be an incomplete class type unless the function definition is nested in the member-specification for that class (including definitions in nested classes defined within the class).
Proposed resolution (10/00): Replace the last sentence of 9.3.4.6 [dcl.fct] paragraph 6 with
The type of a parameter or the return type for a function definition shall not be an incomplete class type (possibly cv-qualified) unless the function definition is nested within the member-specification for that class (including definitions in nested classes defined within the class).
History | |||
---|---|---|---|
Date | User | Action | Args |
2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
2000-11-18 00:00:00 | admin | set | status: ready -> dr |
2000-05-21 00:00:00 | admin | set | status: review -> ready |
2000-02-23 00:00:00 | admin | set | messages: + msg223 |
2000-02-23 00:00:00 | admin | set | status: open -> review |
1999-07-01 00:00:00 | admin | create |