Title
Incomplete types as parameters of deleted functions
Status
cd3
Section
11.3.5 [dcl.fct]
Submitter
Johannes Schaub

Created on 2011-09-11.00:00:00, last changed 2014-03-03.00:00:00.

Messages

Date: 2012-10-15.00:00:00

[Moved to DR at the October, 2012 meeting.]

Date: 2012-02-15.00:00:00

Proposed resolution (February, 2012):

Change 11.3.5 [dcl.fct] paragraph 9 as follows:

Types shall not be defined in return or parameter types. 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 is deleted (11.4.3 [dcl.fct.def.delete]) or the definition is nested within the member-specification for that class (including definitions in nested classes defined within the class).
Date: 2011-09-11.00:00:00

Currently, 11.3.5 [dcl.fct] paragraph 9 requires that

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).

There is no reason for this requirement for a function with a deleted definition, and it would be useful to relax this prohibition in such cases.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-05-03 00:00:00adminsetstatus: dr -> drwp
2012-11-03 00:00:00adminsetmessages: + msg4145
2012-11-03 00:00:00adminsetstatus: ready -> dr
2012-02-27 00:00:00adminsetmessages: + msg3720
2012-02-27 00:00:00adminsetstatus: open -> ready
2011-09-11 00:00:00admincreate