Created on 2023-10-12.00:00:00 last changed 13 months ago
CWG 2023-10-20
The ordered list of preferences should be retained. Eventual disambiguation should be via overload resolution, but it is unclear how to deal with the unspecified choice between overloads with and without a std::size_t parameter.
Consider:
#include <memory> struct B { void operator delete(B* ptr, std::destroying_delete_t); }; struct D : B { void operator delete(D* ptr, std::destroying_delete_t); using B::operator delete; }; void foo(D* ptr) { delete ptr; }
The selection rules in 7.6.2.9 [expr.delete] paragraph 10 do not disambiguate this case. There is implementation divergence.
A similar situation arises for the following example:
struct A { void operator delete(void *); }; struct B { void operator delete(void *); }; struct C : A, B { using A::operator delete; using B::operator delete; }; void foo(C* ptr) { delete ptr; }
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-10-20 21:07:14 | admin | set | messages: + msg7473 |
2023-10-12 00:00:00 | admin | create |