Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cor3ntin
Copy link
Contributor

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

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
@tkoeppe tkoeppe added the cwg Issue must be reviewed by CWG. label Jan 26, 2025
@@ -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}
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Contributor Author

@cor3ntin cor3ntin Jan 26, 2025

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

\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.
Copy link
Member

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.

@@ -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}
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants