|
1387 | 1387 | \indextext{deduction!class template arguments}%
|
1388 | 1388 |
|
1389 | 1389 | \pnum
|
1390 |
| -A set of functions and function templates is formed comprising: |
1391 |
| - |
| 1390 | +When resolving a placeholder for a deduced class type~(\ref{dcl.type.class.deduct}) |
| 1391 | +where the \grammarterm{template-name} names a primary class template \tcode{C}, |
| 1392 | +a set of functions and function templates is formed comprising: |
1392 | 1393 | \begin{itemize}
|
1393 | 1394 | \item
|
1394 |
| -For each constructor |
1395 |
| -of the primary class template |
1396 |
| -designated by the \grammarterm{template-name}, |
1397 |
| -if the template is defined, |
| 1395 | +If \tcode{C} is defined, |
| 1396 | +for each constructor of \tcode{C}, |
1398 | 1397 | a function template with the following properties:
|
1399 | 1398 | \begin{itemize}
|
1400 | 1399 | \item
|
1401 |
| -The template parameters are the template parameters of the class template |
| 1400 | +The template parameters are the template parameters of \tcode{C} |
1402 | 1401 | followed
|
1403 | 1402 | by the template parameters (including default template arguments) of the constructor,
|
1404 | 1403 | if any.
|
1405 | 1404 | \item
|
1406 | 1405 | The types of the function parameters are those of the constructor.
|
1407 | 1406 | \item
|
1408 | 1407 | The return type is the class template specialization
|
1409 |
| -designated by the \grammarterm{template-name} |
| 1408 | +designated by \tcode{C} |
1410 | 1409 | and template arguments
|
1411 |
| -corresponding to the template parameters |
1412 |
| -obtained from the class template. |
| 1410 | +corresponding to the template parameters of \tcode{C}. |
1413 | 1411 | \end{itemize}
|
1414 | 1412 |
|
1415 | 1413 | \item
|
1416 |
| -If the primary class template \tcode{C} |
| 1414 | +If \tcode{C} |
1417 | 1415 | is not defined or does not declare any constructors,
|
1418 | 1416 | an additional function template derived as above
|
1419 | 1417 | from a hypothetical constructor \tcode{C()}.
|
|
1448 | 1446 | the selected functions and function templates are considered to be the
|
1449 | 1447 | constructors of that class type for the purpose of forming an overload
|
1450 | 1448 | set, and the initializer is provided by the context in which class
|
1451 |
| -template argument deduction was performed. Each such notional constructor |
| 1449 | +template argument deduction was performed. |
| 1450 | +As an exception, the first phase in \ref{over.match.list} |
| 1451 | +(considering initializer-list constructors) |
| 1452 | +is omitted if the initializer list consists of |
| 1453 | +a single expression of type \cv{}~\tcode{U}, |
| 1454 | +where \tcode{U} is a specialization of \tcode{C} or |
| 1455 | +a class derived from a specialization of \tcode{C}. |
| 1456 | +Each such notional constructor |
1452 | 1457 | is considered to be explicit if the function or function template was
|
1453 | 1458 | generated from a constructor or \grammarterm{deduction-guide} that was
|
1454 | 1459 | declared \tcode{explicit}.
|
|
0 commit comments