-
Notifications
You must be signed in to change notification settings - Fork 761
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
Rename non-type template parameter/argument to "constant" #7587
base: main
Are you sure you want to change the base?
Conversation
As previously discussed by CWG. The aim is to editorially adopt some of the wording changes made in P2841R5 to ease its review in core. Note that not all-instance of non-type have been mechanically replaced as [dcl] and [diff] use the term to refer to anything that is not a type in the context of lookup
source/templates.tex
Outdated
@@ -296,10 +296,10 @@ | |||
and template | |||
\grammarterm{template-argument}{s} | |||
are treated as types for descriptive purposes, the terms | |||
\term{non-type parameter} | |||
\term{constant parameter} |
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.
We seem to call these "constant template parameter" and "constant template argument" throughout, so we should introduce that very term.
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.
Hum. that footnote is in a bit of a weird state... should we get rid of it now? (the paper does that otherwise)
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.
P2841 has the following
A template parameter has one of the following forms:
• A type template parameter is a template parameter introduced by a type-parameter.
• A constant template parameter is a template parameter introduced by a parameter-declaration.
• A type template template parameter is a template parameter introduced by a type-tt-parameter.
• A variable template template parameter is a template parameter introduced by a variable-tt-parameter.
• A concept template parameter is a template parameter introduced by a concept-tt-parameter.
Type template template parameters, variable template template parameters, and concept
template parameters are collectively referred to as template template parameters.
That surgery seems best left to the paper (as it modifies the grammar - by splitting type-parameter and type-tt-parameter.
We could just replace the footnote by
A constant template parameter is a template parameter introduced by a parameter-declaration
and add the rest of the paragraph later if you think it would produce a more consistent intermediate state.
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 would prefer to keep the changes here as non-inventive as possible, and leave the rest to the paper.
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.
Agreed
source/templates.tex
Outdated
\term{non-type argument} | ||
are used to refer to non-type, non-template parameters and arguments. | ||
\term{constant template argument} | ||
are used to refer to constant, non-template parameters and arguments. |
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 think I want to keep "non-type" here.
source/templates.tex
Outdated
@@ -296,10 +296,10 @@ | |||
and template | |||
\grammarterm{template-argument}{s} | |||
are treated as types for descriptive purposes, the terms | |||
\term{non-type parameter} | |||
\term{constant parameter} |
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 would prefer to keep the changes here as non-inventive as possible, and leave the rest to the paper.
As previously discussed by CWG.
The aim is to editorially adopt some of the wording changes made in P2841R5 to ease its review in core.
Note that not all-instance of non-type have been
mechanically replaced as [dcl] and [diff] use
the term to refer to anything that is not a type
in the context of lookup