File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 396396constructed, but not yet destroyed,
397397since the try block was entered.
398398If an exception is thrown during the destruction of temporaries or
399- local variables for a \keyword {return} statement\iref {stmt.return },
399+ variables for a \keyword {return} statement\iref {stmt.return },
400400the destructor for the returned object (if any) is also invoked.
401401The objects are destroyed in the reverse order of the completion
402402of their construction.
418418}
419419\end {codeblock }
420420At \# 1, the returned object of type \tcode {A} is constructed.
421- Then, the local variable \tcode {b} is destroyed\iref {stmt.jump }.
422- Next, the local variable \tcode {y} is destroyed,
421+ Then, the variable \tcode {b} is destroyed\iref {stmt.jump }.
422+ Next, the variable \tcode {y} is destroyed,
423423causing stack unwinding,
424424resulting in the destruction of the returned object,
425- followed by the destruction of the local variable \tcode {a}.
425+ followed by the destruction of the variable \tcode {a}.
426426Finally, the returned object is constructed again at \# 2.
427427\end {example }
428428
You can’t perform that action at this time.
0 commit comments