-
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
@@ -296,9 +296,9 @@ | |||
and template | |||
\grammarterm{template-argument}{s} | |||
are treated as types for descriptive purposes, the terms | |||
\term{non-type parameter} | |||
\term{constant template 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.
The footnote makes no sense following the change being proposed here. I really think we should just strike the first part of the sentence @jensmaurer @cor3ntin.
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.
@hubert-reinterpretcast It gets struck by the paper (which updates the surrounded text), hopefully we can live with that imperfection for a few weeks. I don't have any objection to do it now but we agreed to keep the changes minimal
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.
hopefully we can live with that imperfection for a few weeks
I would rather not risk needing the paper to keep things in shape.
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.
It is not clear that the concept template parameters paper makes it to the Hagenberg plenary, given that we also have contracts and reflection on the plate, which take priority. Given Hubert's view, I think I want the bulleted list from the paper (which replaces the footnote) here, because we otherwise have no definition for the term "constant template parameter", it seems.
That's still editorial, I think; we don't change the meaning of the specification.
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.
The bulleted list refers to grammar production that don't exist in the current wording
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'd rather go with Hubert suggestion and remove the first part of the sentence. The fact that we have a definition in a footnote was pre-existing. I'll do that
source/templates.tex
Outdated
All other non-type arguments are specialized. | ||
A constant template argument is non-specialized if it is the name of a constant | ||
template parameter. | ||
All other constant arguments are specialized. |
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.
All other constant arguments are specialized. | |
All other constant template arguments are specialized. |
source/templates.tex
Outdated
@@ -4598,7 +4598,7 @@ | |||
\item \grammarterm{parameter-declaration} in a \grammarterm{lambda-declarator} | |||
or \grammarterm{requirement-parameter-list}, | |||
unless that \grammarterm{parameter-declaration} appears in a default argument, or | |||
\item \grammarterm{parameter-declaration} of a (non-type) \grammarterm{template-parameter}. | |||
\item \grammarterm{parameter-declaration} of a (constant) \grammarterm{template-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.
\item \grammarterm{parameter-declaration} of a (constant) \grammarterm{template-parameter}. | |
\item \grammarterm{parameter-declaration} of a \grammarterm{template-parameter} that declares a constant template 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 considered that (and also to remove the parenthetical entirely). parameter-declaration implies a constant template parameter, I'm afraid your wording might imply the existence of some alternative
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.
\item \grammarterm{parameter-declaration} of a (constant) \grammarterm{template-parameter}. | |
\item \grammarterm{parameter-declaration} of a \grammarterm{template-parameter} (which necessarily declares a constant template 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.
@cor3ntin, I think you applied the older suggestion? Jens expressed a preference for the newer one.
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.
fixed (I completely missed it)
@jensmaurer Can we make progress on this this week? I am afraid things are going to be rather messy otherwise. 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.
LGTM; thanks!
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