Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The wording in paragraph [temp.variadic#8] may make a bit misleading #4229

Open
xmh0511 opened this issue Sep 24, 2020 · 0 comments
Open

The wording in paragraph [temp.variadic#8] may make a bit misleading #4229

xmh0511 opened this issue Sep 24, 2020 · 0 comments
Labels
cwg Issue must be reviewed by CWG.

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Sep 24, 2020

Consider such a paragraph in [temp.variadic], that is:

The instantiation of a pack expansion that is neither a sizeof... expression nor a fold-expression produces a list of elements E1,E2,...,EN, where N is the number of elements in the pack expansion parameters. Each Ei is generated by instantiating the pattern and replacing each pack expansion parameter with its ith element. Such an element, in the context of the instantiation, is interpreted as follows:

Please note the bolded phrase, it sounds like that the element is ascribed to Ei. However, IIUC, according to the sentence "where N is the number of elements in the pack expansion parameters", this element should refer to that of pack expansion parameters, so this sentence would make a bit misleading. For example, T...t, where T is a template parameter pack, since its pattern is T t, hence the ith element(namely Ei) of such a list that was produced by the instantiation of this pack expansion should be Ti t where Ti would be the the ith element of the pack expansion parameters, which denotes the corresponding template parameter .

So, would this paragraph be modified to:

The instantiation of a pack expansion that is neither a sizeof... expression nor a fold-expression produces a comma-separated list of elements, that is E1,E2,...,EN, where N is the number of elements in the pack expansion parameters. Each Ei is generated by instantiating the pattern and replacing each pack expansion parameter with the ith element of the pack expansion parameters. Such an element, in the context of the instantiation, is interpreted as follows:

Will it be more clear?

@xmh0511 xmh0511 changed the title The wording in [temp.variadic] make a bit misleading The wording in paragraph [temp.variadic#8] may make a bit misleading Sep 24, 2020
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Dec 16, 2020
@jensmaurer jensmaurer added cwg Issue must be reviewed by CWG. and removed decision-required A decision of the editorial group (or the Project Editor) is required. labels Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

No branches or pull requests

2 participants