-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
are abstract
/ base
specifiers permitted or required on class forward declarations?
#3384
Labels
leads question
A question for the leads team
Comments
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 13, 2023
) For now, we require the same introducer to be used each time a class is declared, but see #3384. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
@justzh - Please keep comments on PRs and issues constructive and on-topic. I'm hiding yours, but you've had warnings now and so I will block if this continues. |
This question was discussed at the end of open discussion on 2024-05-09. I believe the conclusions were:
|
This question was addressed by #3762 after consideration of alternatives:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary of issue:
Given this class:
how does one write a forward declaration? Is
valid? Is
valid?
Details:
There doesn't seem to be a reason to require the
abstract
orbase
specifier to be present on a forward declaration. But usually our forward declaration syntax for classes is a prefix of the definition, and there also doesn't seem to be any particular hardship to developers in requiring the forward declaration to repeat the specifier.In addition to the three answers suggested by the question (specifier is disallowed, specifier is allowed but not required, specifier is required), we could change the class definition syntax to put the specifier in the class body, as we did for inheritance:
Any other information that you want to share?
No response
The text was updated successfully, but these errors were encountered: