r/cpp • • Apr 02 '26

What happens when a destructor throws

https://www.sandordargo.com/blog/2026/04/01/when-a-destructor-throws
102 Upvotes

48 comments sorted by

View all comments

Show parent comment

1

u/tangerinelion Apr 03 '26

On a regular function, the advantage of function try is reducing indentation by one level.

When function try blocks are applied to regular functions they also don't have the implicit rethrow behavior.