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 (
[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
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 (
[expr.delete])
. [
Example 7:
struct S {
static void* operator new(std::size_t, std::size_t);
static void operator delete(void*, std::size_t);
};
S* p = new (0) S;
—
end example]