Skip to content

Commit b9f054b

Browse files
cor3ntintkoeppe
authored andcommitted
[std] Rename "non-type" to "constant" template parameter/argument (#7587)
Note that not all instances 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.
1 parent 9282117 commit b9f054b

9 files changed

+72
-74
lines changed

source/basic.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@
21042104
the classes of which any member templates used as template template
21052105
arguments are members.
21062106
\begin{note}
2107-
Non-type template arguments do not
2107+
Constant template arguments do not
21082108
contribute to the set of associated entities.
21092109
\end{note}
21102110

source/compatibility.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -1648,12 +1648,12 @@
16481648

16491649
\diffref{temp.deduct.type}
16501650
\change
1651-
Allowance to deduce from the type of a non-type template argument.
1651+
Allowance to deduce from the type of a constant template argument.
16521652
\rationale
16531653
In combination with the ability to declare
1654-
non-type template arguments with placeholder types,
1654+
constant template arguments with placeholder types,
16551655
allows partial specializations to decompose
1656-
from the type deduced for the non-type template argument.
1656+
from the type deduced for the constant template argument.
16571657
\effect
16581658
Valid \CppXIV{} code may fail to compile
16591659
or produce different results in this revision of \Cpp{}.

source/declarations.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -1671,7 +1671,7 @@
16711671
the specification of the structured binding declaration;
16721672

16731673
\item otherwise, if $E$ is an unparenthesized \grammarterm{id-expression}
1674-
naming a non-type template parameter\iref{temp.param},
1674+
naming a constant template parameter\iref{temp.param},
16751675
\tcode{decltype($E$)} is the type of the template parameter
16761676
after performing any necessary
16771677
type deduction\iref{dcl.spec.auto,dcl.type.class.deduct};
@@ -2106,9 +2106,9 @@
21062106
and $E$ is the \grammarterm{assignment-expression}.
21072107
\end{itemize}
21082108
\item
2109-
For a non-type template parameter declared with a type
2109+
For a constant template parameter declared with a type
21102110
that contains a placeholder type,
2111-
\tcode{T} is the declared type of the non-type template parameter
2111+
\tcode{T} is the declared type of the constant template parameter
21122112
and $E$ is the corresponding template argument.
21132113
\end{itemize}
21142114

@@ -7185,7 +7185,7 @@
71857185
in the scope of \tcode{E}\iref{class.member.lookup}
71867186
finds at least one declaration
71877187
that is a function template whose first template parameter
7188-
is a non-type parameter,
7188+
is a constant template parameter,
71897189
the initializer is
71907190
\tcode{\exposidnc{e}.get<i>()}. Otherwise, the initializer is \tcode{get<i>(\exposid{e})},
71917191
where \tcode{get} undergoes argument-dependent lookup\iref{basic.lookup.argdep}.

source/expressions.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -8186,7 +8186,7 @@
81868186
expressions\iref{expr.new}, as case expressions\iref{stmt.switch},
81878187
as enumerator initializers if the underlying type is
81888188
fixed\iref{dcl.enum}, as array bounds\iref{dcl.array}, and
8189-
as non-type template
8189+
as constant template
81908190
arguments\iref{temp.arg}.
81918191
\end{note}
81928192
\indextext{contextually converted constant expression of type \tcode{bool}|see{conversion, contextual}}%

source/lex.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@
22182218
and let \placeholder{len} be the number of code units in \placeholder{str}
22192219
(i.e., its length excluding the terminating null character).
22202220
If \placeholder{S} contains a literal operator template with
2221-
a non-type template parameter for which \placeholder{str} is
2221+
a constant template parameter for which \placeholder{str} is
22222222
a well-formed \grammarterm{template-argument},
22232223
the literal \placeholder{L} is treated as a call of the form
22242224
\begin{codeblock}

source/meta.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
\pnum
6060
The alias template
6161
\tcode{make_integer_sequence} denotes a specialization of
62-
\tcode{integer_sequence} with \tcode{N} non-type template arguments.
62+
\tcode{integer_sequence} with \tcode{N} constant template arguments.
6363
The type \tcode{make_integer_sequence<T, N>} is an alias for the type
6464
\tcode{integer_sequence<T, 0, 1, ..., N - 1>}.
6565
\begin{note}

source/numerics.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@
25532553
\pnum
25542554
Each template specified in \ref{rand.eng}
25552555
requires one or more relationships,
2556-
involving the value(s) of its non-type template parameter(s), to hold.
2556+
involving the value(s) of its constant template parameter(s), to hold.
25572557
A program instantiating any of these templates
25582558
is ill-formed
25592559
if any such required relationship fails to hold.
@@ -3345,7 +3345,7 @@
33453345
\pnum
33463346
Each template specified in \ref{rand.adapt}
33473347
requires one or more relationships,
3348-
involving the value(s) of its non-type template parameter(s), to hold.
3348+
involving the value(s) of its constant template parameter(s), to hold.
33493349
A program instantiating any of these templates
33503350
is ill-formed
33513351
if any such required relationship fails to hold.

source/overloading.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -3103,7 +3103,7 @@
31033103
\item
31043104
an explicit type conversion\iref{expr.type.conv,expr.static.cast,expr.cast}, or
31053105
\item
3106-
a non-type template parameter\iref{temp.arg.nontype}.
3106+
a constant template parameter\iref{temp.arg.nontype}.
31073107
\end{itemize}
31083108
If the target type contains a placeholder type,
31093109
placeholder type deduction is performed\iref{dcl.type.auto.deduct}, and
@@ -4094,13 +4094,13 @@
40944094
A \defnx{numeric literal operator template}{literal!operator!template numeric}
40954095
is a literal operator template whose \grammarterm{template-parameter-list}
40964096
has a single \grammarterm{template-parameter}
4097-
that is a non-type template parameter pack\iref{temp.variadic}
4097+
that is a constant template parameter pack\iref{temp.variadic}
40984098
with element type \tcode{char}.
40994099
A \defnx{string literal operator template}{literal!operator!template string}
41004100
is a literal operator template whose \grammarterm{template-parameter-list}
41014101
comprises
41024102
a single \grammarterm{parameter-declaration} that declares a
4103-
non-type template parameter of class type.
4103+
constant template parameter of class type.
41044104
The declaration of a literal operator template
41054105
shall have an empty \grammarterm{parameter-declaration-clause}
41064106
and shall declare either a numeric literal operator template

0 commit comments

Comments
 (0)