Skip to content

Commit ed19e8a

Browse files
committed
P2841R7 Concept and variable-template template-parameters
[temp.param]temp.arg.type] Some instructions do not apply due to more recent changes in the wording. [temp.param] Added a reference for concept-dependent to where it's defined. [temp.constr.concept] Replace "may" with "might" inside note.
1 parent 10468bf commit ed19e8a

File tree

4 files changed

+440
-150
lines changed

4 files changed

+440
-150
lines changed

source/basic.tex

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,16 @@
7070
\item
7171
\grammarterm{using-declarator}\iref{namespace.udecl},
7272
\item
73-
\grammarterm{parameter-declaration}\iref{dcl.fct},
73+
\grammarterm{parameter-declaration}\iref{dcl.fct,temp.param},
7474
\item
7575
\grammarterm{type-parameter}\iref{temp.param},
7676
\item
77+
\grammarterm{type-tt-parameter}\iref{temp.param},
78+
\item
79+
\grammarterm{variable-tt-parameter}\iref{temp.param},
80+
\item
81+
\grammarterm{concept-tt-parameter}\iref{temp.param},
82+
\item
7783
\grammarterm{elaborated-type-specifier}
7884
that introduces a name\iref{dcl.type.elab},
7985
\item
@@ -1490,7 +1496,11 @@
14901496
\rSec2[basic.scope.temp]{Template parameter scope}%
14911497

14921498
\pnum
1493-
Each template \grammarterm{template-parameter} introduces
1499+
Each
1500+
\grammarterm{type-tt-parameter},
1501+
\grammarterm{variable-tt-parameter}, and
1502+
\grammarterm{concept-tt-parameter}
1503+
introduces
14941504
a \defnadj{template parameter}{scope}
14951505
that includes the \grammarterm{template-head} of
14961506
the \grammarterm{template-parameter}.
@@ -2011,7 +2021,7 @@
20112021
then lookup for the name also includes the result of
20122022
\defnadj{argument-dependent}{lookup} in a set of associated namespaces
20132023
that depends on the types of the arguments
2014-
(and for template template arguments, the namespace of the template argument),
2024+
(and for type template template arguments, the namespace of the template argument),
20152025
as specified below.
20162026
\begin{example}
20172027
\begin{codeblock}
@@ -2079,7 +2089,7 @@
20792089
to be considered.
20802090
The set of entities is determined entirely by
20812091
the types of the function arguments
2082-
(and any template template arguments).
2092+
(and any type template template arguments).
20832093
Any \grammarterm{typedef-name}s and \grammarterm{using-declaration}{s}
20842094
used to specify the types
20852095
do not contribute to this set.
@@ -2099,11 +2109,14 @@
20992109
the entities
21002110
associated with the types of the template arguments
21012111
provided for template type parameters;
2102-
the templates used as template template arguments; and
2103-
the classes of which any member templates used as template template
2112+
the templates used as type template template arguments; and
2113+
the classes of which any member templates used as type template template
21042114
arguments are members.
21052115
\begin{note}
2106-
Constant template arguments do not
2116+
Constant template arguments,
2117+
variable template template arguments, and
2118+
concept template arguments
2119+
do not
21072120
contribute to the set of associated entities.
21082121
\end{note}
21092122

source/declarations.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@
778778
\indextext{class name!\idxcode{typedef}}%
779779
A \grammarterm{simple-template-id} is only a \grammarterm{typedef-name}
780780
if its \grammarterm{template-name} names
781-
an alias template or a template template parameter.
781+
an alias template or a type template template parameter.
782782
\begin{note}
783783
A \grammarterm{simple-template-id} that names a class template specialization
784784
is a \grammarterm{class-name}\iref{class.name}.
@@ -4021,7 +4021,7 @@
40214021
An abbreviated function template is equivalent to
40224022
a function template\iref{temp.fct}
40234023
whose \grammarterm{template-parameter-list} includes
4024-
one invented type \grammarterm{template-parameter}
4024+
one invented \grammarterm{type-parameter}
40254025
for each generic parameter type placeholder
40264026
of the function declaration, in order of appearance.
40274027
For a \grammarterm{placeholder-type-specifier} of the form \keyword{auto},
@@ -4031,7 +4031,7 @@
40314031
\grammarterm{type-constraint} \keyword{auto},
40324032
the invented parameter is a \grammarterm{type-parameter} with
40334033
that \grammarterm{type-constraint}.
4034-
The invented type \grammarterm{template-parameter} is
4034+
The invented \grammarterm{type-parameter} declares
40354035
a template parameter pack
40364036
if the corresponding \grammarterm{parameter-declaration}
40374037
declares a function parameter pack.
@@ -4040,7 +4040,7 @@
40404040
The adjusted function parameters of an abbreviated function template
40414041
are derived from the \grammarterm{parameter-declaration-clause} by
40424042
replacing each occurrence of a placeholder with
4043-
the name of the corresponding invented \grammarterm{template-parameter}.
4043+
the name of the corresponding invented \grammarterm{type-parameter}.
40444044
\begin{example}
40454045
\begin{codeblock}
40464046
template<typename T> concept C1 = /* ... */;

source/preprocessor.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,7 @@
19061906
\defnxname{cpp_static_assert} & \tcode{202306L} \\ \rowsep
19071907
\defnxname{cpp_static_call_operator} & \tcode{202207L} \\ \rowsep
19081908
\defnxname{cpp_structured_bindings} & \tcode{202411L} \\ \rowsep
1909+
\defnxname{cpp_template_parameters} & \tcode{202502L} \\ \rowsep
19091910
\defnxname{cpp_template_template_args} & \tcode{201611L} \\ \rowsep
19101911
\defnxname{cpp_threadsafe_static_init} & \tcode{200806L} \\ \rowsep
19111912
\defnxname{cpp_unicode_characters} & \tcode{200704L} \\ \rowsep

0 commit comments

Comments
 (0)