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

2024-10-26


1669. auto return type for main

Section: 6.9.3.1  [basic.start.main]     Status: C++14     Submitter: Richard Smith     Date: 2013-04-26

[Applied to WP at the February, 2014 meeting.]

Should it be permitted for main to have a deduced return type?

(See also issue 1676.)

Proposed resolution (November, 2013):

Change 6.9.3.1 [basic.start.main] paragraph 2 as follows:

An implementation shall not predefine the main function. This function shall not be overloaded. It shall have a declared return type of type int, but otherwise its type is implementation-defined. All implementations An implementation shall allow both

as the type...