1006. operator delete in garbage collected implementation

Section: 17.6.3 [new.delete] Status: C++11 Submitter: Alisdair Meredith Opened: 2009-03-11 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [new.delete].

View all issues with C++11 status.

Discussion:

Addresses UK 190

It is not entirely clear how the current specification acts in the presence of a garbage collected implementation.

[ Summit: ]

Agreed.

[ 2009-05-09 Alisdair adds: ]

Proposed wording is too strict for implementations that do not support garbage collection. Updated wording supplied.

[ Batavia (2009-05): ]

We recommend advancing this to Tentatively Ready with the understanding that it will not be moved for adoption unless and until the proposed resolution to Core issue #853 is adopted.

Proposed resolution:

(Editorial note: This wording ties into the proposed resolution for Core #853)

Add paragraphs to 17.6.3.2 [new.delete.single]:

void operator delete(void* ptr) throw();
void operator delete(void* ptr, const std::nothrow_t&) throw();

[ The second signature deletion above is editorial. ]

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-10- ...

void operator delete(void* ptr, const std::nothrow_t&) throw();

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-15- ...

Add paragraphs to 17.6.3.3 [new.delete.array]:

void operator delete[](void* ptr) throw();
void operator delete[](void* ptr, const std::nothrow_t&) throw();

[ The second signature deletion above is editorial. ]

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-9- ...

void operator delete[](void* ptr, const std::nothrow_t&) throw();

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-13- ...

Add paragraphs to 17.6.3.4 [new.delete.placement]:

void operator delete(void* ptr, void*) throw();

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-7- ...

void operator delete[](void* ptr, void*) throw();

Requires: If an implementation has strict pointer safety ( [basic.stc.dynamic.safety]) then ptr shall be a safely-derived pointer.

-9- ...