Title
cv void return types
Status
cd3
Section
8.7.4 [stmt.return]
Submitter
Sean Hunt

Created on 2012-08-21.00:00:00 last changed 90 months ago

Messages

Date: 2013-04-15.00:00:00

[Moved to DR at the April, 2013 meeting.]

Date: 2012-10-15.00:00:00

Proposed resolution (October, 2012):

Change 8.7.4 [stmt.return] paragraph 2 as follows:

A return statement with neither an expression nor a braced-init-list can be used only in functions that do not return a value, that is, a function with the return type cv void, a constructor (11.4.5 [class.ctor]), or a destructor (11.4.7 [class.dtor]). A return statement with an expression of non-void type...
Date: 2012-08-21.00:00:00

According to 8.7.4 [stmt.return] paragraph 3,

A return statement with neither an expression nor a braced-init-list can be used only in functions that do not return a value, that is, a function with the return type void, a constructor (11.4.5 [class.ctor]), or a destructor (11.4.7 [class.dtor]).

However, paragraph 3 allows a return type of cv void in cases where the expression in the return statement has type void. Should paragraph 2 follow suit?

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2013-10-14 00:00:00adminsetstatus: dr -> drwp
2013-05-03 00:00:00adminsetmessages: + msg4397
2013-05-03 00:00:00adminsetstatus: ready -> dr
2012-11-03 00:00:00adminsetmessages: + msg4058
2012-11-03 00:00:00adminsetstatus: open -> ready
2012-08-21 00:00:00admincreate