|
1583 | 1583 | For each function or function template \tcode{f} in the guides of
|
1584 | 1584 | the template named by the \grammarterm{simple-template-id}
|
1585 | 1585 | of the \grammarterm{defining-type-id},
|
| 1586 | +the template arguments of the return type of \tcode{f} |
| 1587 | +are deduced |
| 1588 | +from the \grammarterm{defining-type-id} of \tcode{A} |
| 1589 | +according to the process in \ref{temp.deduct.type} |
| 1590 | +with the exception that deduction does not fail |
| 1591 | +if not all template arguments are deduced. |
| 1592 | +Let \tcode{g} denote the result of substituting |
| 1593 | +these deductions into \tcode{f}. |
| 1594 | +If substitution succeeds, |
1586 | 1595 | form a function or function template \tcode{f'}
|
1587 |
| -according to the following procedure and add it to the set: |
| 1596 | +with the following properties and add it to the set |
| 1597 | +of guides of \tcode{A}: |
1588 | 1598 | \begin{itemize}
|
1589 | 1599 | \item
|
1590 |
| - The template arguments of the return type of \tcode{f} |
1591 |
| - are deduced |
1592 |
| - from the \grammarterm{defining-type-id} of \tcode{A} |
1593 |
| - according to the process in \ref{temp.deduct.type} |
1594 |
| - with the exception that deduction does not fail |
1595 |
| - if not all template arguments are deduced. |
1596 |
| - Let \tcode{g} denote the result of substituting |
1597 |
| - these deductions into \tcode{f}. |
1598 |
| - If the substitution fails, no \tcode{f'} is produced. |
1599 |
| - Otherwise, the function or function template \tcode{f'} is formed as follows: |
1600 |
| - \begin{itemize} |
1601 |
| - \item |
1602 |
| - The function type of \tcode{f'} is the function type of \tcode{g}. |
1603 |
| - \item |
1604 |
| - If \tcode{f} is a function template, |
1605 |
| - \tcode{f'} is a function template whose |
1606 |
| - template parameter list consists of |
1607 |
| - all the template parameters of \tcode{A} |
1608 |
| - (including their default template arguments) |
1609 |
| - that appear in the above deductions or |
1610 |
| - (recursively) in their default template arguments, |
1611 |
| - followed by the template parameters of \tcode{f} that were not deduced |
1612 |
| - (including their default template arguments), |
1613 |
| - otherwise \tcode{f'} is not a function template. |
1614 |
| - \item |
1615 |
| - The associated constraints\iref{temp.constr.decl} are |
1616 |
| - the conjunction of the associated constraints of \tcode{g} and |
1617 |
| - a constraint that is satisfied if and only if |
1618 |
| - the arguments of \tcode{A} are deducible (see below) from the return type. |
1619 |
| - \end{itemize} |
| 1600 | +The function type of \tcode{f'} is the function type of \tcode{g}. |
| 1601 | + |
| 1602 | +\item |
| 1603 | +If \tcode{f} is a function template, |
| 1604 | +\tcode{f'} is a function template whose |
| 1605 | +template parameter list consists of |
| 1606 | +all the template parameters of \tcode{A} |
| 1607 | +(including their default template arguments) |
| 1608 | +that appear in the above deductions or |
| 1609 | +(recursively) in their default template arguments, |
| 1610 | +followed by the template parameters of \tcode{f} that were not deduced |
| 1611 | +(including their default template arguments), |
| 1612 | +otherwise \tcode{f'} is not a function template. |
| 1613 | + |
1620 | 1614 | \item
|
1621 |
| - If \tcode{f} is a copy deduction candidate\iref{over.match.class.deduct}, |
1622 |
| - then \tcode{f'} is considered to be so as well. |
| 1615 | +The associated constraints\iref{temp.constr.decl} are |
| 1616 | +the conjunction of the associated constraints of \tcode{g} and |
| 1617 | +a constraint that is satisfied if and only if |
| 1618 | +the arguments of \tcode{A} are deducible (see below) from the return type. |
| 1619 | + |
1623 | 1620 | \item
|
1624 |
| - If \tcode{f} was generated |
1625 |
| - from a deduction-guide\iref{over.match.class.deduct}, |
1626 |
| - then \tcode{f'} is considered to be so as well. |
| 1621 | +If \tcode{f} is a copy deduction candidate\iref{over.match.class.deduct}, |
| 1622 | +then \tcode{f'} is considered to be so as well. |
| 1623 | + |
| 1624 | +\item |
| 1625 | +If \tcode{f} was generated |
| 1626 | +from a \grammarterm{deduction-guide}\iref{over.match.class.deduct}, |
| 1627 | +then \tcode{f'} is considered to be so as well. |
| 1628 | + |
1627 | 1629 | \item
|
1628 |
| - The \grammarterm{explicit-specifier} of \tcode{f'} is |
1629 |
| - the \grammarterm{explicit-specifier} of g (if any). |
| 1630 | +The \grammarterm{explicit-specifier} of \tcode{f'} is |
| 1631 | +the \grammarterm{explicit-specifier} of \tcode{g} (if any). |
1630 | 1632 | \end{itemize}
|
1631 | 1633 |
|
1632 | 1634 | \indextext{template!deducible arguments of}%
|
|
0 commit comments