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 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1646,12 +1646,12 @@

\diffref{temp.deduct.type}
\change
Allowance to deduce from the type of a non-type template argument.
Allowance to deduce from the type of a constant template argument.
\rationale
In combination with the ability to declare
non-type template arguments with placeholder types,
constant template arguments with placeholder types,
allows partial specializations to decompose
from the type deduced for the non-type template argument.
from the type deduced for the constant template argument.
\effect
Valid \CppXIV{} code may fail to compile
or produce different results in this revision of \Cpp{}.
Expand Down
8 changes: 4 additions & 4 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@
the specification of the structured binding declaration;

\item otherwise, if $E$ is an unparenthesized \grammarterm{id-expression}
naming a non-type template parameter\iref{temp.param},
naming a constant template parameter\iref{temp.param},
\tcode{decltype($E$)} is the type of the template parameter
after performing any necessary
type deduction\iref{dcl.spec.auto,dcl.type.class.deduct};
Expand Down Expand Up @@ -2106,9 +2106,9 @@
and $E$ is the \grammarterm{assignment-expression}.
\end{itemize}
\item
For a non-type template parameter declared with a type
For a constant template parameter declared with a type
that contains a placeholder type,
\tcode{T} is the declared type of the non-type template parameter
\tcode{T} is the declared type of the constant template parameter
and $E$ is the corresponding template argument.
\end{itemize}

Expand Down Expand Up @@ -7185,7 +7185,7 @@
in the scope of \tcode{E}\iref{class.member.lookup}
finds at least one declaration
that is a function template whose first template parameter
is a non-type parameter,
is a constant parameter,
the initializer is
\tcode{\exposidnc{e}.get<i>()}. Otherwise, the initializer is \tcode{get<i>(\exposid{e})},
where \tcode{get} undergoes argument-dependent lookup\iref{basic.lookup.argdep}.
Expand Down
2 changes: 1 addition & 1 deletion source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -8186,7 +8186,7 @@
expressions\iref{expr.new}, as case expressions\iref{stmt.switch},
as enumerator initializers if the underlying type is
fixed\iref{dcl.enum}, as array bounds\iref{dcl.array}, and
as non-type template
as constant template
arguments\iref{temp.arg}.
\end{note}
\indextext{contextually converted constant expression of type \tcode{bool}|see{conversion, contextual}}%
Expand Down
2 changes: 1 addition & 1 deletion source/lex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2218,7 +2218,7 @@
and let \placeholder{len} be the number of code units in \placeholder{str}
(i.e., its length excluding the terminating null character).
If \placeholder{S} contains a literal operator template with
a non-type template parameter for which \placeholder{str} is
a constant template parameter for which \placeholder{str} is
a well-formed \grammarterm{template-argument},
the literal \placeholder{L} is treated as a call of the form
\begin{codeblock}
Expand Down
2 changes: 1 addition & 1 deletion source/meta.tex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
\pnum
The alias template
\tcode{make_integer_sequence} denotes a specialization of
\tcode{integer_sequence} with \tcode{N} non-type template arguments.
\tcode{integer_sequence} with \tcode{N} constant template arguments.
The type \tcode{make_integer_sequence<T, N>} is an alias for the type
\tcode{integer_sequence<T, 0, 1, ..., N-1>}.
\begin{note}
Expand Down
4 changes: 2 additions & 2 deletions source/numerics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2564,7 +2564,7 @@
\pnum
Each template specified in \ref{rand.eng}
requires one or more relationships,
involving the value(s) of its non-type template parameter(s), to hold.
involving the value(s) of its constant template parameter(s), to hold.
A program instantiating any of these templates
is ill-formed
if any such required relationship fails to hold.
Expand Down Expand Up @@ -3356,7 +3356,7 @@
\pnum
Each template specified in \ref{rand.adapt}
requires one or more relationships,
involving the value(s) of its non-type template parameter(s), to hold.
involving the value(s) of its constant template parameter(s), to hold.
A program instantiating any of these templates
is ill-formed
if any such required relationship fails to hold.
Expand Down
6 changes: 3 additions & 3 deletions source/overloading.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3103,7 +3103,7 @@
\item
an explicit type conversion\iref{expr.type.conv,expr.static.cast,expr.cast}, or
\item
a non-type template parameter\iref{temp.arg.nontype}.
a constant template parameter\iref{temp.arg.nontype}.
\end{itemize}
If the target type contains a placeholder type,
placeholder type deduction is performed\iref{dcl.type.auto.deduct}, and
Expand Down Expand Up @@ -4094,13 +4094,13 @@
A \defnx{numeric literal operator template}{literal!operator!template numeric}
is a literal operator template whose \grammarterm{template-parameter-list}
has a single \grammarterm{template-parameter}
that is a non-type template parameter pack\iref{temp.variadic}
that is a constant template parameter pack\iref{temp.variadic}
with element type \tcode{char}.
A \defnx{string literal operator template}{literal!operator!template string}
is a literal operator template whose \grammarterm{template-parameter-list}
comprises
a single \grammarterm{parameter-declaration} that declares a
non-type template parameter of class type.
constant template parameter of class type.
The declaration of a literal operator template
shall have an empty \grammarterm{parameter-declaration-clause}
and shall declare either a numeric literal operator template
Expand Down
Loading