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
Several issues about section [except.spec] #4561
Comments
The problem is that p6.1 talks about the postfix-expression of a function call, but for an implicit invocation of a function, there is no corresponding explicit source code that would match the grammar for postfix-expression.
The sentence starts with
An implicitly-declared function does not have a declaration, so this sentence does not apply at all. |
Well. So, the remaining issue is the first issue. function, constructor, or destructor cannot be said that they are potentially-throwing since they're not expressions. An implicitly-declared function does not have a declaration, so this sentence does not apply at all. The arguable place is, there's a sentence in the standard that says
However, we would argue here, there's no explicit grammar in the translation unit related to a declaration. Hence, it may not be considered a declaration. |
Misusing of the wording "potentially-throwing" in these cases
AFAIK, the property "potentially-throwing" ascribes to an expression. That is, we may say an expression is potentially-throwing or not. However, we cannot say a constructor, destructor, or function is potentially-throwing. Maybe, we should say such an entity has the potentially-throwing exception specification
The statement for implicitly-declared assignment operator indicates this point
So, for the first three bullets. Should we say that the invocation of the destructor, constructor, or function is potentially-throwing? Or, another way, such a constructor, destructor, or function has the potentially-throwing exception specification? That may make sense.
The redundant bullet of defining "potentially-throwing"
In this case, Isn't that the last bullet can cover the former, as per
The exception of a declaration that does not have a noexcept-specifier
As specified below, the relevant rules do not only cover the case for
defaulted on its first declaration
but also cover the case for implicitly-declared. So, in order to be consistent, I think the introduction in this sentence should add the case for implicitly-declared into its exception cases.The text was updated successfully, but these errors were encountered: