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
[temp.arg.general] p2 template argument list of template-head seems to have a more restriction #4845
Comments
I think "value of" allows typedefs, but "I" and "I+0" are not equivalent (although functionally equivalent), so I wouldn't expect "I+0" to work. @opensdh, the wording here was introduced by your paper, I believe. Any thoughts here? |
The type template parameter that is not a pack or pack expansion is itself a typedef-name. Except that, I cannot figure out we can declare a typedef declaration in a declaration. If functionally equivalent is not considered here, why not we directly say it shall be the name of the corresponding parameter. |
My assumption is that [temp.arg.general]/2 means "has the value of" to just be "is". If not that, the equivalence invoked in [expr.prim.id.qual]/3.2 is surely the right interpretation, which would reject
That wording was merely moved by P1787R6 from [temp.dep.type]/2, where it dated back to C++11. |
Even if it were that, IMHO, the value of Let alone it seems there is no way to declare a variable in such context to make it equal to the template parameter. Hence, why not directly say the template argument shall be the identifier introduced by the template parameter declaration. |
Consider thie example
The definition for class member
B
is rejected by most implementations. In this case, the nested-name-specifier is governed by [expr.prim.id.qual] p3Since
I+0
can arguably be the value of the template parameterI
, it should be the template argument list of the template-head. I don't know does it say has the value of the nth template parameter intends to give the possibility to the above example? However, for the parameter pack, it uses the name. From the practice, we should also use the name for the common template parameter too. It may be thatThe text was updated successfully, but these errors were encountered: