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

2024-05-06


2807. Destructors declared consteval

Section: 11.4.7  [class.dtor]     Status: DRWP     Submitter: Corentin Jabot     Date: 2023-09-07

[Accepted as a DR at the November, 2023 meeting.]

There is a conflict between 9.2.6 [dcl.constexpr] paragraph 2

A destructor, an allocation function, or a deallocation function shall not be declared with the consteval specifier.

and 11.4.7 [class.dtor] paragraph 1

Each decl-specifier of the decl-specifier-seq of a prospective destructor declaration (if any) shall be friend, inline, virtual, constexpr, or consteval.

Proposed resolution (approved by CWG 2023-10-20):

Change in 11.4.7 [class.dtor] paragraph 1 as follows:

Each decl-specifier of the decl-specifier-seq of a prospective destructor declaration (if any) shall be friend, inline, virtual, or constexpr, or consteval.