cplusplus / cplusplus/draft

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

Open
#4,229 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cwg
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the [temp.variadic] paragraph identified in the issue and compare the current wording with the proposed revision. Check that the revised text clearly distinguishes each Eᵢ from the corresponding pack-expansion parameter element; done means the paragraph expresses that relationship without changing its intended meaning.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.