This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


901. Deleted operator delete

Section:  []     Status: drafting     Submitter: John Spicer     Date: 20 May, 2009

It is not clear from [] whether a deleted operator delete is referenced by a new-expression in which there is no initialization or in which the initialization cannot throw an exception, rendering the program ill-formed. (The question also arises as to whether such a new-expression constitutes a “use” of the deallocation function in the sense of 6.3 [basic.def.odr].)

Notes from the July, 2009 meeting:

The rationale for defining a deallocation function as deleted would presumably be to prevent such objects from being freed. Treating the new-expression as a use of such a deallocation function would mean that such objects could not be created in the first place. There is already an exemption from freeing an object if “a suitable deallocation function [cannot] be found;” a deleted deallocation function should be treated similarly.

Additional notes (April, 2023):

An additional use-case for a deleted deallocation function would be to ensure that the initialization of the object is not potentially-throwing.

For cases where the deallocation function is never called from the constructor, access checking for it should not be done.