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

2026-10-10


3233. Function contract assertions are needed for pure virtual function calls

Section: 9.4.1  [dcl.contract.func]     Status: tentatively ready     Submitter: Joshua Berne     Date: 2026-09-06

(From submission #1003.)

With P3097R3 (Contracts for C++: Virtual functions), adopted in June, 2026, function contract assertions are now required to be instantiated in cases where a pure virtual function is called, even when the function is not odr-used.

Proposed resolution (approved by CWG 2026-10-06):

Change in 9.4.1 [dcl.contract.func] paragraph 9 as follows:

The function contract assertions of a function are considered to be needed (13.9.2 [temp.inst]) when