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
I wonder Is it a mis-wording in the following quote, that is
The instantiation of a pack expansion that is neither a sizeof... expression nor a fold-expression produces a list 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:
if the pack is a template parameter pack, the element is a template parameter of the corresponding kind (type or non-type) designating the type or value from the template argument; otherwise,
if the pack is a function parameter pack, the element is an id-expression designating the function parameter that resulted from the instantiation of the pattern where the pack is declared.
The pattern of a function parameter pack is a parameter-declaration without ellipsis. A usual parameter-declaration consists of :
In any case , the decl-specifier-seq is not an optional component.
In this example
template<typename...T>
voidfunc(T...args){
}
T...args is a function parameter pack, thereof, T args is its pattern. So my issues is, why the element generated from instantiation of a pattern of a function parameter pack is id-expression, However the id-expression is only a part of declarator of a parameter-declaration.
The text was updated successfully, but these errors were encountered:
I wonder Is it a mis-wording in the following quote, that is
The pattern of a function parameter pack is a parameter-declaration without ellipsis. A usual parameter-declaration consists of :
In any case , the
decl-specifier-seq
is not an optional component.In this example
T...args
is a function parameter pack, thereof,T args
is its pattern. So my issues is, why the element generated from instantiation of a pattern of a function parameter pack isid-expression
, However theid-expression
is only a part of declarator of a parameter-declaration.The text was updated successfully, but these errors were encountered: