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
[func.require] Unclear use of "shall" LWG4007 #6640
Comments
We customarily use "shall" for constraints on the user-written program. Thus, it's the first item. |
For the library use of "shall" it's the second, i.e. UB. This means the impl is allowed to accept it as an extension (for backwards compatibility), instead of being required to reject it as ill-formed. |
Ah, thanks for the info. |
In the interests of removing unnecessary UB, maybe we should consider making this conditionally supported, or explicitly unspecified (which would still allow it to be supported as an extension, but wouldn't open the door to nasal demons and unbounded UB). |
I failed to express that the current wording seemingly mixes requirements for implementations and user codes in a strange way (at least to me). Should we editorially clarify the status quo by divorcing the requirements, or open an LWG issue to change it? |
Please request an LWG issue, because I'd like to revisit the implied UB. |
[func.require]/4 reads:
It seems that the "shall be" used here is imposing some additional requirements, and thus shouldn't be interpreted as plain "is". But the additional requirements don't seem clear.
volatile
value of the wrapper is called, the invocation is ill-formed, orvolatile
value of the wrapper is not called, otherwise, the behavior is undefined, orvolatile
value unspecified?The text was updated successfully, but these errors were encountered: