Title
Overriding by a consteval virtual function
Status
ready
Section
11.7.3 [class.virtual]
Submitter
Daniel Katz

Created on 2025-11-06.00:00:00 last changed 1 month ago

Messages

Date: 2025-11-06.18:30:40

Proposed resolution (approved by CWG 2025-11-06):

Change in 11.7.3 [class.virtual] paragraph 18 as follows:

A class with a consteval virtual function shall not override that overrides a virtual function that is not consteval shall have consteval-only type (6.9.1 [basic.types.general]). A consteval virtual function shall not be overridden by a virtual function that is not consteval.
Date: 2025-11-06.18:30:08

The current prohibition against overriding a non-consteval virtual function by a consteval virtual function (inside a consteval-only type) is too restrictive and prevents implementation of std::meta::exception.

History
Date User Action Args
2025-11-06 18:30:40adminsetstatus: open -> ready
2025-11-06 14:17:10adminsetmessages: + msg8226
2025-11-06 00:00:00admincreate