- Title
- Matching a usual deallocation function with placement new
- Status
- c++20
- Section
- 7.6.2.8 [expr.new]
- Submitter
- Richard Smith
Created on 2016-06-27.00:00:00 last changed 69 months ago
Messages
Date: 2017-02-15.00:00:00
Proposed resolution (February, 2017): Change 7.6.2.8 [expr.new] paragraph 27 as follows:
A declaration of a placement deallocation function matches the declaration
of a placement allocation function if it has the same number of parameters
and, after parameter transformations (9.3.4.6 [dcl.fct]), all
parameter types except the first are identical. If the lookup finds a
single matching deallocation function, that function will be called;
otherwise, no deallocation function will be called. If the lookup finds a
usual deallocation function
>
with a parameter of
type std::size_t (6.8.6.5.3 [basic.stc.dynamic.deallocation]) and that
function, considered as a placement deallocation function, would have been
selected as a match for the allocation function, the program is
ill-formed. For a non-placement allocation function, the normal
deallocation function lookup is used to find the matching deallocation
function (7.6.2.9 [expr.delete]). [Example:...
Date: 2019-11-15.00:00:00
[Accepted as a DR at the November, 2019 meeting.] The restrictions in 7.6.2.8 [expr.new] against
a placement deallocation function signature matching a usual
deallocation function signature consider only std::size_t
parameters, omitting std::align_val_t parameters.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-12-15 00:00:00 | admin | set | status: review -> c++20 |
| 2018-02-27 00:00:00 | admin | set | messages: + msg5882 |
| 2016-06-27 00:00:00 | admin | create | |