|
1254 | 1254 | \end{codeblock}
|
1255 | 1255 | \exitexample
|
1256 | 1256 |
|
| 1257 | +\pnum A \grammarterm{template-argument} matches a template |
| 1258 | +\grammarterm{template-parameter} (call it \tcode{P}) when each of the template |
| 1259 | +parameters in the \grammarterm{template-parameter-list} of the |
| 1260 | +\grammarterm{template-argument}'s corresponding class template or alias template (call |
| 1261 | +it \tcode{A}) matches the corresponding template parameter in the |
| 1262 | +\grammarterm{template-parameter-list} of \tcode{P}. |
| 1263 | +Two template parameters match if they are of the same kind (type, non-type, template), |
| 1264 | +for non-type \grammarterm{template-parameter}{s}, their types are |
| 1265 | +equivalent~(\ref{temp.over.link}), and for template \grammarterm{template-parameter}{s}, |
| 1266 | +each of their corresponding \grammarterm{template-parameter}{s} matches, recursively. |
| 1267 | +When \tcode{P}'s \grammarterm{template-parameter-list} contains a template parameter |
| 1268 | +pack~(\ref{temp.variadic}), the template parameter pack will match zero or more template |
| 1269 | +parameters or template parameter packs in the \grammarterm{template-parameter-list} of |
| 1270 | +\tcode{A} with the same type and form as the template parameter pack in \tcode{P} |
| 1271 | +(ignoring whether those template parameters are template parameter packs). |
| 1272 | + |
1257 | 1273 | \enterexample
|
1258 | 1274 | \begin{codeblock}
|
1259 | 1275 | template<class T> class A { /* ... */ };
|
|
1273 | 1289 | \end{codeblock}
|
1274 | 1290 | \exitexample
|
1275 | 1291 |
|
1276 |
| -\pnum A \grammarterm{template-argument} matches a template |
1277 |
| -\grammarterm{template-parameter} (call it \tcode{P}) when each of the template |
1278 |
| -parameters in the \grammarterm{template-parameter-list} of the |
1279 |
| -\grammarterm{template-argument}'s corresponding class template or alias template (call |
1280 |
| -it \tcode{A}) matches the corresponding template parameter in the |
1281 |
| -\grammarterm{template-parameter-list} of \tcode{P}. |
1282 |
| -Two template parameters match if they are of the same kind (type, non-type, template), |
1283 |
| -for non-type \grammarterm{template-parameter}{s}, their types are |
1284 |
| -equivalent~(\ref{temp.over.link}), and for template \grammarterm{template-parameter}{s}, |
1285 |
| -each of their corresponding \grammarterm{template-parameter}{s} matches, recursively. |
1286 |
| -When \tcode{P}'s \grammarterm{template-parameter-list} contains a template parameter |
1287 |
| -pack~(\ref{temp.variadic}), the template parameter pack will match zero or more template |
1288 |
| -parameters or template parameter packs in the \grammarterm{template-parameter-list} of |
1289 |
| -\tcode{A} with the same type and form as the template parameter pack in \tcode{P} |
1290 |
| -(ignoring whether those template parameters are template parameter packs) \enterexample |
1291 |
| - |
| 1292 | +\enterexample |
1292 | 1293 | \begin{codeblock}
|
1293 | 1294 | template <class T> struct eval;
|
1294 | 1295 |
|
|
0 commit comments