Skip to content

Commit bb3d30f

Browse files
authored
Merge 2025-02 CWG Motion 7
P2841R7 Concept and variable-template template-parameters
2 parents 070deb4 + 1749957 commit bb3d30f

File tree

4 files changed

+454
-165
lines changed

4 files changed

+454
-165
lines changed

source/basic.tex

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,16 @@
7474
\item
7575
\grammarterm{using-declarator}\iref{namespace.udecl},
7676
\item
77-
\grammarterm{parameter-declaration}\iref{dcl.fct},
77+
\grammarterm{parameter-declaration}\iref{dcl.fct,temp.param},
7878
\item
7979
\grammarterm{type-parameter}\iref{temp.param},
8080
\item
81+
\grammarterm{type-tt-parameter}\iref{temp.param},
82+
\item
83+
\grammarterm{variable-tt-parameter}\iref{temp.param},
84+
\item
85+
\grammarterm{concept-tt-parameter}\iref{temp.param},
86+
\item
8187
\grammarterm{elaborated-type-specifier}
8288
that introduces a name\iref{dcl.type.elab},
8389
\item
@@ -1506,7 +1512,11 @@
15061512
\rSec2[basic.scope.temp]{Template parameter scope}%
15071513

15081514
\pnum
1509-
Each template \grammarterm{template-parameter} introduces
1515+
Each
1516+
\grammarterm{type-tt-parameter},
1517+
\grammarterm{variable-tt-parameter}, and
1518+
\grammarterm{concept-tt-parameter}
1519+
introduces
15101520
a \defnadj{template parameter}{scope}
15111521
that includes the \grammarterm{template-head} of
15121522
the \grammarterm{template-parameter}.
@@ -2051,7 +2061,7 @@
20512061
then lookup for the name also includes the result of
20522062
\defnadj{argument-dependent}{lookup} in a set of associated namespaces
20532063
that depends on the types of the arguments
2054-
(and for template template arguments, the namespace of the template argument),
2064+
(and for type template template arguments, the namespace of the template argument),
20552065
as specified below.
20562066
\begin{example}
20572067
\begin{codeblock}
@@ -2119,7 +2129,7 @@
21192129
to be considered.
21202130
The set of entities is determined entirely by
21212131
the types of the function arguments
2122-
(and any template template arguments).
2132+
(and any type template template arguments).
21232133
Any \grammarterm{typedef-name}s and \grammarterm{using-declaration}{s}
21242134
used to specify the types
21252135
do not contribute to this set.
@@ -2139,11 +2149,14 @@
21392149
the entities
21402150
associated with the types of the template arguments
21412151
provided for template type parameters;
2142-
the templates used as template template arguments; and
2143-
the classes of which any member templates used as template template
2152+
the templates used as type template template arguments; and
2153+
the classes of which any member templates used as type template template
21442154
arguments are members.
21452155
\begin{note}
2146-
Constant template arguments do not
2156+
Constant template arguments,
2157+
variable template template arguments, and
2158+
concept template arguments
2159+
do not
21472160
contribute to the set of associated entities.
21482161
\end{note}
21492162

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}.
@@ -4041,7 +4041,7 @@
40414041
An abbreviated function template is equivalent to
40424042
a function template\iref{temp.fct}
40434043
whose \grammarterm{template-parameter-list} includes
4044-
one invented type \grammarterm{template-parameter}
4044+
one invented \grammarterm{type-parameter}
40454045
for each generic parameter type placeholder
40464046
of the function declaration, in order of appearance.
40474047
For a \grammarterm{placeholder-type-specifier} of the form \keyword{auto},
@@ -4051,7 +4051,7 @@
40514051
\grammarterm{type-constraint} \keyword{auto},
40524052
the invented parameter is a \grammarterm{type-parameter} with
40534053
that \grammarterm{type-constraint}.
4054-
The invented type \grammarterm{template-parameter} is
4054+
The invented \grammarterm{type-parameter} declares
40554055
a template parameter pack
40564056
if the corresponding \grammarterm{parameter-declaration}
40574057
declares a function parameter pack.
@@ -4060,7 +4060,7 @@
40604060
The adjusted function parameters of an abbreviated function template
40614061
are derived from the \grammarterm{parameter-declaration-clause} by
40624062
replacing each occurrence of a placeholder with
4063-
the name of the corresponding invented \grammarterm{template-parameter}.
4063+
the name of the corresponding invented \grammarterm{type-parameter}.
40644064
\begin{example}
40654065
\begin{codeblock}
40664066
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_trivial_union} & \tcode{202502L} \\ \rowsep

0 commit comments

Comments
 (0)