[expr.new] p26 Is the matching deallocation function guaranteed to be invoked when no matching handler can be found? CWG2566 #5390
Labels
cwg
Issue must be reviewed by CWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
[expr.new] p26 says
This implies that the deallocation function is unconditionally invoked as long as a matching version can be found. It didn't talk about whether or not a handler is necessary to be found before invoking that function.
Consider this example:
From this point, the invocation of the matching deallocation is observable, however, no implementations guarantee that function will be called. We can only find that [except.handle] p9 says:
However, it is irrelevant here since stack unwinding only concerns destroying an object.
According to the implementations' behavior, we may add a condition for whether or not the matching deallocation function is called. Two suggestions here:
The text was updated successfully, but these errors were encountered: