Skip to content

Commit

Permalink
Merge pull request #74 from Bekenn/fixes
Browse files Browse the repository at this point in the history
More minor edits
  • Loading branch information
cor3ntin authored Jun 26, 2024
2 parents fcb0ebb + 84b97bd commit ff51b85
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions src/D2841.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1847,14 +1847,14 @@ \subsection{\textcolor{noteclr}{3. Wording for variable-template and concept tem

\textcolor{noteclr}{[...]}

\rSec2[temp.arg.type]{Template type arguments}
\rSec2[temp.arg.type]{\changed{Template type}{Type template} arguments}

\pnum
A \grammarterm{template-argument} for a \changed{\grammarterm{template-parameter} which is a type}{type template parameter} shall be a \grammarterm{type-id}.
A \grammarterm{template-argument} for a \grammarterm{template-parameter} which \changed{is a type}{declares a type template parameter} shall be a \grammarterm{type-id}.

\textcolor{noteclr}{[...]}

\rSec2[temp.arg.nontype]{Template \changed{non-type}{constant} arguments}
\rSec2[temp.arg.nontype]{\changed{Template non-type}{Constant template} arguments}

\textcolor{noteclr}{[...]}

Expand Down Expand Up @@ -1906,28 +1906,12 @@ \subsection{\textcolor{noteclr}{3. Wording for variable-template and concept tem
\pnum
Any partial specializations \iref{temp.spec.partial} associated with the
primary template are considered when a
specialization based on the template
\grammarterm{template-parameter}
specialization based on the template \changed{\grammarterm{template-parameter}}{template parameter}
is instantiated.
If a specialization is not reachable from the point of instantiation,
and it would have been selected had it been reachable, the program is ill-formed,
no diagnostic required.
\begin{example}
\begin{codeblock}
template<class T> class A { // primary template
int x;
};
template<class T> class A<T*> { // partial specialization
long x;
};
template<template<class U> class V> class C {
V<int> y;
V<int*> z;
};
C<A> c; // \tcode{V<int>} within \tcode{C<A>} uses the primary template, so \tcode{c.y.x} has type \tcode{int}
// \tcode{V<int*>} within \tcode{C<A>} uses the partial specialization, so \tcode{c.z.x} has type \tcode{long}
\end{codeblock}
\end{example}
\begin{example} \textcolor{noteclr}{[...]} \end{example}

\begin{addedblock}
Two template parameters are of the same kind if:
Expand Down

0 comments on commit ff51b85

Please sign in to comment.