Skip to content

Commit 7b7a5d0

Browse files
committed
Rename non-type template parameter/argument to "constant"
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
1 parent 6583c4a commit 7b7a5d0

File tree

8 files changed

+65
-65
lines changed

8 files changed

+65
-65
lines changed

source/compatibility.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,12 +1646,12 @@
16461646

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

source/declarations.tex

Lines changed: 4 additions & 4 deletions
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 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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@
25642564
\pnum
25652565
Each template specified in \ref{rand.eng}
25662566
requires one or more relationships,
2567-
involving the value(s) of its non-type template parameter(s), to hold.
2567+
involving the value(s) of its constant template parameter(s), to hold.
25682568
A program instantiating any of these templates
25692569
is ill-formed
25702570
if any such required relationship fails to hold.
@@ -3356,7 +3356,7 @@
33563356
\pnum
33573357
Each template specified in \ref{rand.adapt}
33583358
requires one or more relationships,
3359-
involving the value(s) of its non-type template parameter(s), to hold.
3359+
involving the value(s) of its constant template parameter(s), to hold.
33603360
A program instantiating any of these templates
33613361
is ill-formed
33623362
if any such required relationship fails to hold.

source/overloading.tex

Lines changed: 3 additions & 3 deletions
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)