Never call a destroying operator delete when cleaning up from an
exception thrown during construction in a new-expression. Instead, when performing deallocation function lookup for a new-expression, ignore all destroying operator delete candidates, and fall back to global operator delete if there is no member operator delete other than a destroying operator delete. Use of destroying operator delete only makes sense when there is an object to destroy, which there isn't in this case. The language wording doesn't cover this case; this oversight has been reported to WG21, with the approach in this patch as the proposed fix.
Loading
Please sign in to comment