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.pre] Reword "shall not be used to" avoiding question of actual "use" #5413
[except.pre] Reword "shall not be used to" avoiding question of actual "use" #5413
Conversation
72ab267
to
c19b51f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this.
…l "use" The "shall not be used to" phrasing may be taken to refer only in cases where the actual use occurs or is the primary intent. Instead, the intended restriction can be written in terms of static properties of the constructs so restricted in the style of [stmt.if]. A new term of art (control-flow-limited statement) is introduced in [stmt.label] to express the restrictions. Both [stmt.if] and [except.pre] are updated to use the new term. Co-authored-by: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
aa3db9e
to
05b3844
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a nice improvement to me.
I briefly considered whether it'd be useful to say that the body of a function is also control-flow-limited, but that doesn't seem to really allow any further simplifications. (We could maybe delete the second sentence of [stmt.goto]/1, but that seems to be about it.)
@tkoeppe , any final thoughts before I merge this? |
@jensmaurer: no, this does look like a nice improvement. As long as you're CWG-happy with inventing new terms editorially here, please do feel free to merge. (Maybe CWG should be informed that we have a new term at some point? Then again, control flow is not something that we touch a lot.) |
The "shall not be used to" phrasing may be taken to refer only in cases
where the actual use occurs or is the primary intent. Instead, the
intended restriction can be written in terms of static properties of the
constructs so restricted in the style of [stmt.if].
A new term of art (control-flow-limited statement) is introduced in
[stmt.label] to express the restrictions. Both [stmt.if] and
[except.pre] are updated to use the new term.
Co-authored-by: Johel Ernesto Guerrero Peña johelegp@gmail.com