Skip to content

[temp.param] Remove definitions in footnote and fix wording referring to non-type template parameters #3917

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions source/templates.tex
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,16 @@
\tcode{typename}
followed by a
\grammarterm{qualified-id}
denotes the type in a non-type%
denotes the type in a \grammarterm{parameter-declaration}.%
Copy link
Member

Choose a reason for hiding this comment

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

We now have a footnote explaining what we mean by "non-type" attached to wording that doesn't say "non-type". That doesn't seem ideal. But in any case the disambiguation rule for template<class T> seems like a very strange place to be defining "non-type".

\footnote{Since template
\grammarterm{template-parameter}{s}
and template
\grammarterm{template-argument}{s}
are treated as types for descriptive purposes, the terms
\term{non-type parameter}
and
\term{non-type argument}
are used to refer to non-type, non-template parameters and arguments.}
\grammarterm{parameter-declaration}.
non-type \grammarterm{template-parameter} and
non-type \grammarterm{template-argument}
Copy link
Member

Choose a reason for hiding this comment

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

I actually think those definitions should be normative and indexed; they are used quite a lot and we shouldn't rely on the "since" rationale offered here for readers to understand a fairly basic 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.

Should we do non-type template-parameter like we do for trailing requires-clause, or non-type template parameter? The former seems to be used more often than the latter.

are used to refer to non-type, non-template \grammarterm{template-parameter}{s}
and \grammarterm{template-argument}{s}.}
A \grammarterm{template-parameter} of the form
\tcode{class} \grammarterm{identifier} is a \grammarterm{type-parameter}.
\begin{example}
Expand Down