You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
Consider such a paragraph in [temp.variadic], that is:
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", thiselement
should refer to that ofpack expansion parameters
, so this sentence would make a bit misleading. For example,T...t
, whereT
is a template parameter pack, since its pattern isT t
, hence the ith element(namely Ei) of such a list that was produced by the instantiation of this pack expansion should beTi 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:
Will it be more clear?
The text was updated successfully, but these errors were encountered: