Title
Missing definition for placement allocation/deallocation function
Status
open
Section
7.6.2.8 [expr.new]
Submitter
Jim X

Created on 2022-04-14.00:00:00 last changed 2 months ago

Messages

Date: 2022-06-11.20:21:09

Subclause 7.6.2.8 [expr.new] has multiple references to "placement allocation function" and "placement deallocation function", but those terms are never defined. The term "usual deallocation function" is defined in 6.7.5.5.3 [basic.stc.dynamic.deallocation] paragraph 3:

... A usual deallocation function is a deallocation function whose parameters after the first are
  • optionally, a parameter of type std::destroying_delete_t, then
  • optionally, a parameter of type std::size_t, [ Footnote: ... ] then
  • optionally, a parameter of type std::align_val_t.

Possible resolution:

  1. Split 6.7.5.5.2 [basic.stc.dynamic.allocation] paragraph 1 and change it as follows:

    ... The value of the first parameter is interpreted as the requested size of the allocation. A usual allocation function is an allocation function with no parameters after the first or with a single parameter of type std::align_val_t after the first. A placement allocation function is an allocation function that is not a usual allocation function.

    An allocation function can be a function template. ...

  2. Split 6.7.5.5.3 [basic.stc.dynamic.deallocation] paragraph 3 and change it as follows:

    ... A destroying operator delete shall be a usual deallocation function. A placement deallocation function is a deallocation function that is not a usual deallocation function.

    A deallocation function may be an instance of a function template. ...

History
Date User Action Args
2022-04-14 00:00:00admincreate