|
2539 | 2539 |
|
2540 | 2540 | \pnum
|
2541 | 2541 | An \defnx{\grammarterm{init-capture} pack}{init-capture pack@\fakegrammarterm{init-capture} pack}
|
2542 |
| -introduces an \grammarterm{init-capture} |
| 2542 | +is a lambda capture that introduces an \grammarterm{init-capture} |
2543 | 2543 | for each of the elements in the pack expansion of its \grammarterm{initializer}.
|
2544 | 2544 | \begin{example}
|
2545 | 2545 | \begin{codeblock}
|
|
2562 | 2562 | or an \grammarterm{init-capture} pack.
|
2563 | 2563 | The number of elements of a template parameter pack
|
2564 | 2564 | or a function parameter pack
|
2565 |
| -is the number of arguments provided for the parameter pack \grammarterm{identifier}. |
| 2565 | +is the number of arguments provided for the parameter pack. |
2566 | 2566 | The number of elements of an \grammarterm{init-capture} pack
|
2567 | 2567 | is the number of elements in the pack expansion of its \grammarterm{initializer}.
|
2568 | 2568 |
|
|
2681 | 2681 | that is neither a \tcode{sizeof...} expression
|
2682 | 2682 | nor a \grammarterm{fold-expression}
|
2683 | 2683 | produces a
|
2684 |
| -list |
2685 |
| -$\mathtt{E}_1, \mathtt{E}_2, \dotsc, \mathtt{E}_N$, |
| 2684 | +list of elements |
| 2685 | +$\mathtt{E}_1,$ $\mathtt{E}_2,$ $\cdots,$ $\mathtt{E}_N$, |
2686 | 2686 | where
|
2687 | 2687 | $N$ is the number of elements in the pack expansion parameters. Each
|
2688 | 2688 | $\mathtt{E}_i$ is generated by instantiating the pattern and
|
2689 |
| -replacing each pack expansion parameter with its $i$th element. |
| 2689 | +replacing each pack expansion parameter with its $i^{\textrm{th}}$ element. |
2690 | 2690 | Such an element, in the context of the instantiation, is interpreted as
|
2691 | 2691 | follows:
|
2692 | 2692 |
|
2693 | 2693 | \begin{itemize}
|
2694 | 2694 | \item
|
2695 | 2695 | if the pack is a template parameter pack, the element is a template
|
2696 | 2696 | parameter\iref{temp.param} of the corresponding kind (type or
|
2697 |
| -non-type) designating the type or value from the template |
2698 |
| -argument; |
| 2697 | +non-type) designating the $i^{\textrm{th}}$ |
| 2698 | +corresponding type or value template argument; |
2699 | 2699 |
|
2700 | 2700 | \item
|
2701 | 2701 | if the pack is a function parameter pack, the element is an
|
2702 | 2702 | \grammarterm{id-expression}
|
2703 |
| -designating the function parameter that resulted from |
2704 |
| -the instantiation of the pattern where the pack is declared; |
| 2703 | +designating the $i^{\textrm{th}}$ function parameter |
| 2704 | +that resulted from instantiation of |
| 2705 | +the function parameter pack declaration; |
2705 | 2706 | otherwise
|
2706 | 2707 |
|
2707 | 2708 | \item
|
2708 | 2709 | if the pack is an \grammarterm{init-capture} pack,
|
2709 | 2710 | the element is an \grammarterm{id-expression}
|
2710 |
| -designating the variable declared by the \grammarterm{init-capture} |
2711 |
| -that resulted from the instantiation of the pattern where the pack is declared. |
| 2711 | +designating the variable introduced by |
| 2712 | +the $i^{\textrm{th}}$ \grammarterm{init-capture} |
| 2713 | +that resulted from instantiation of |
| 2714 | +the \grammarterm{init-capture} pack. |
2712 | 2715 | \end{itemize}
|
2713 | 2716 |
|
2714 |
| -All of the $\mathtt{E}_i$ become elements in the enclosing list. |
| 2717 | +All of the $\mathtt{E}_i$ become items in the enclosing list. |
2715 | 2718 | \begin{note} The variety of list varies with the context:
|
2716 | 2719 | \grammarterm{expression-list},
|
2717 | 2720 | \grammarterm{base-specifier-list},
|
|
0 commit comments