Skip to content

P2841R7 Concept and variable-template template-parameters #7690

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

Merged
merged 4 commits into from
Mar 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 20 additions & 7 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,16 @@
\item
\grammarterm{using-declarator}\iref{namespace.udecl},
\item
\grammarterm{parameter-declaration}\iref{dcl.fct},
\grammarterm{parameter-declaration}\iref{dcl.fct,temp.param},
\item
\grammarterm{type-parameter}\iref{temp.param},
\item
\grammarterm{type-tt-parameter}\iref{temp.param},
\item
\grammarterm{variable-tt-parameter}\iref{temp.param},
\item
\grammarterm{concept-tt-parameter}\iref{temp.param},
\item
\grammarterm{elaborated-type-specifier}
that introduces a name\iref{dcl.type.elab},
\item
Expand Down Expand Up @@ -1506,7 +1512,11 @@
\rSec2[basic.scope.temp]{Template parameter scope}%

\pnum
Each template \grammarterm{template-parameter} introduces
Each
\grammarterm{type-tt-parameter},
\grammarterm{variable-tt-parameter}, and
\grammarterm{concept-tt-parameter}
introduces
a \defnadj{template parameter}{scope}
that includes the \grammarterm{template-head} of
the \grammarterm{template-parameter}.
Expand Down Expand Up @@ -2051,7 +2061,7 @@
then lookup for the name also includes the result of
\defnadj{argument-dependent}{lookup} in a set of associated namespaces
that depends on the types of the arguments
(and for template template arguments, the namespace of the template argument),
(and for type template template arguments, the namespace of the template argument),
as specified below.
\begin{example}
\begin{codeblock}
Expand Down Expand Up @@ -2119,7 +2129,7 @@
to be considered.
The set of entities is determined entirely by
the types of the function arguments
(and any template template arguments).
(and any type template template arguments).
Any \grammarterm{typedef-name}s and \grammarterm{using-declaration}{s}
used to specify the types
do not contribute to this set.
Expand All @@ -2139,11 +2149,14 @@
the entities
associated with the types of the template arguments
provided for template type parameters;
the templates used as template template arguments; and
the classes of which any member templates used as template template
the templates used as type template template arguments; and
the classes of which any member templates used as type template template
arguments are members.
\begin{note}
Constant template arguments do not
Constant template arguments,
variable template template arguments, and
concept template arguments
do not
contribute to the set of associated entities.
\end{note}

Expand Down
8 changes: 4 additions & 4 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
\indextext{class name!\idxcode{typedef}}%
A \grammarterm{simple-template-id} is only a \grammarterm{typedef-name}
if its \grammarterm{template-name} names
an alias template or a template template parameter.
an alias template or a type template template parameter.
\begin{note}
A \grammarterm{simple-template-id} that names a class template specialization
is a \grammarterm{class-name}\iref{class.name}.
Expand Down Expand Up @@ -4041,7 +4041,7 @@
An abbreviated function template is equivalent to
a function template\iref{temp.fct}
whose \grammarterm{template-parameter-list} includes
one invented type \grammarterm{template-parameter}
one invented \grammarterm{type-parameter}
for each generic parameter type placeholder
of the function declaration, in order of appearance.
For a \grammarterm{placeholder-type-specifier} of the form \keyword{auto},
Expand All @@ -4051,7 +4051,7 @@
\grammarterm{type-constraint} \keyword{auto},
the invented parameter is a \grammarterm{type-parameter} with
that \grammarterm{type-constraint}.
The invented type \grammarterm{template-parameter} is
The invented \grammarterm{type-parameter} declares
a template parameter pack
if the corresponding \grammarterm{parameter-declaration}
declares a function parameter pack.
Expand All @@ -4060,7 +4060,7 @@
The adjusted function parameters of an abbreviated function template
are derived from the \grammarterm{parameter-declaration-clause} by
replacing each occurrence of a placeholder with
the name of the corresponding invented \grammarterm{template-parameter}.
the name of the corresponding invented \grammarterm{type-parameter}.
\begin{example}
\begin{codeblock}
template<typename T> concept C1 = /* ... */;
Expand Down
1 change: 1 addition & 0 deletions source/preprocessor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,7 @@
\defnxname{cpp_static_assert} & \tcode{202306L} \\ \rowsep
\defnxname{cpp_static_call_operator} & \tcode{202207L} \\ \rowsep
\defnxname{cpp_structured_bindings} & \tcode{202411L} \\ \rowsep
\defnxname{cpp_template_parameters} & \tcode{202502L} \\ \rowsep
\defnxname{cpp_template_template_args} & \tcode{201611L} \\ \rowsep
\defnxname{cpp_threadsafe_static_init} & \tcode{200806L} \\ \rowsep
\defnxname{cpp_trivial_union} & \tcode{202502L} \\ \rowsep
Expand Down
Loading