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

2024-03-20


2015. odr-use of deleted virtual functions

Section: 9.5.3  [dcl.fct.def.delete]     Status: CD4     Submitter: David Majnemer     Date: 2014-10-05

[Moved to DR at the October, 2015 meeting.]

It is not clear that the odr-use of a virtual function described in 6.3 [basic.def.odr] paragraph 3 is exempt from the prohibition against referring to a deleted function (9.5.3 [dcl.fct.def.delete] paragraph 2) .

Proposed resolution (May, 2015):

Change 9.5.3 [dcl.fct.def.delete] paragraph 2 as follows:

A program that refers to a deleted function implicitly or explicitly, other than to declare it, is ill-formed. [Note: This includes calling the function implicitly or explicitly and forming a pointer or pointer-to-member to the function. It applies even for references in expressions that are not potentially-evaluated. If a function is overloaded, it is referenced only if the function is selected by overload resolution. The implicit odr-use (6.3 [basic.def.odr]) of a virtual function does not, by itself, constitute a reference.end note]