A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1541.html below:

CWG Issue 1541

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-08-11

1541. cv void return typesSection: 8.8.4  [stmt.return]     Status: CD3     Submitter: Sean Hunt     Date: 2012-08-21

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

According to 8.8.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?

Proposed resolution (October, 2012):

Change 8.8.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 cvvoid, 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...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4