Title
Missing specifications for consteval and constinit
Status
cd6
Section
6.9.3.1 [basic.start.main]
Submitter
Davis Herring

Created on 2020-10-09.00:00:00 last changed 28 months ago

Messages

Date: 2021-11-15.00:00:00

Proposed resolution, May, 2021:

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

  2. ...A program that defines main as deleted or that declares main to be inline, static, or constexpr, or consteval is ill-formed...
  3. Change 9.3.4.1 [dcl.meaning.general] paragraph 4 as follows:

  4. A static, thread_local, extern, mutable, friend, inline, virtual, constexpr, consteval, constinit, or typedef specifier or an explicit-specifier applies directly to each declarator-id in a declaration; the type specified for each declarator-id depends on both the decl-specifier-seq and its declarator.
  5. Change 11.4.5.1 [class.ctor.general] paragraph 5 as follows:

  6. ...Constructors do not have names. In a constructor declaration, each decl-specifier in the optional decl-specifier-seq shall be friend, inline, constexpr, consteval, or an explicit-specifier.
Date: 2021-06-15.00:00:00

[Accepted as a DR at the June, 2021 meeting.]

There are several places where the consteval and/or constinit keywords should be mentioned but are not:

6.9.3.1 [basic.start.main] paragraph 3:

A program that defines main as deleted or that declares main to be inline, static, or constexpr is ill-formed.

9.3.4.1 [dcl.meaning.general] paragraph 2:

A static, thread_local, extern, mutable, friend, inline, virtual, constexpr, or typedef specifier or an explicit-specifier applies directly to each declarator-id in an init-declarator-list or member-declarator-list...

11.4.5.1 [class.ctor.general] paragraph 1:

...In a constructor declaration, each decl-specifier in the optional decl-specifier-seq shall be friend, inline, constexpr, or an explicit-specifier.
History
Date User Action Args
2022-08-19 07:54:33adminsetstatus: drwp -> cd6
2021-11-15 00:00:00adminsetmessages: + msg6582
2021-11-15 00:00:00adminsetstatus: open -> drwp
2020-10-09 00:00:00admincreate