-
Notifications
You must be signed in to change notification settings - Fork 969
Remove outdated example and update C2998 error reference #5474
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
Remove outdated example and update C2998 error reference #5474
Conversation
@Rageking8 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
Learn Build status updates of commit 21a1b6e: ✅ Validation status: passed
For more details, please refer to the build report. |
PRMerger Results
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
@TylerMSFT Could you review this proposed update to your article and enter Thanks! |
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 tried several examples and the compiler is better at calling out the specific thing that is wrong rather than giving this more general error. For example:
template enum MyEnum { Value };
template typedef int MyType;
template namespace MyNamespace {}; // got close but got C2988
int main()
{
template int y = 42;
}
struct S {
template static int x;
};
Agree with pulling the example.
#sign-off |
The old example is presumably written before variable template got introduced in C++14, which made that definition well formed. I tried and could not get the compiler to emit C2998, hence the example should be removed for now.