Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[except.handle] p9 handler vs. implicit handler #5236

Open
xmh0511 opened this issue Jan 25, 2022 · 0 comments
Open

[except.handle] p9 handler vs. implicit handler #5236

xmh0511 opened this issue Jan 25, 2022 · 0 comments

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jan 25, 2022

[except.handle] p7 says

A handler is considered active when initialization is complete for the parameter (if any) of the catch clause. Also, an implicit handler is considered active when the function std​::​terminate is entered due to a throw.

Since the implicit handler can be considered active, it should also be considered as a matching handler. Simultaneously, [except.handle] p9 sates

If no matching handler is found, the function std​::​terminate is invoked;

Then, whether the implicit handle can be found? this issue is caused by that [except.handle] p7 and [except.handle] p9 have a cross-dependence. I think we should improve [except.handle] p9 to eliminate the dependence:

If no matching handler other than the implicit handler is found, the function std​::​terminate is invoked;

which means, the "the matching handler" case only considers the lexcially handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant