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
[dcl.meaning.general] p3.3 The lookup for the declarator-id that is an identifier in the explicit instantiation or specialization for function template
#5496
Open
xmh0511 opened this issue
May 27, 2022
· 0 comments
If the declarator declares an explicit instantiation or a partial or explicit specialization, the declarator does not bind a name. If it declares a class member, the terminal name of the declarator-id is not looked up; otherwise, only those lookup results that are nominable in S are considered when identifying any function template specialization being declared ([temp.deduct.decl]).
We do not restrict more requirements on the name lookup for fun. The result should consist of #1 and #2. [temp.deduct.decl] p1 says
In a declaration whose declarator-id refers to a specialization of a function template, template argument deduction is performed to identify the specialization to which the declaration refers.
It is not clear whether the declarator-id that is an identifier refers to a specialization of a function template or not. We just say
A template specialization can be referred to by a template-id
in [temp.names] p1. The identifier refers to a specialization only if the deduction succeeds, I think. [temp.deduct.decl] p1 also says
In all these cases, P is the type of the function template being considered as a potential match...
This implies that only function templates are considered when identifying any function template specialization.
[dcl.meaning.general] p3.3 might be changed to
otherwise, only those lookup results that are function templates and are nominable in S are considered when identifying any function template specialization being declared ([temp.deduct.decl]).
change [temp.deduct.decl] p1 to
In explicit instantiations, explicit specializations, and certain friend declarations, template argument deduction is performed to identify the template of which the specialization is being declared/instantiated by the declaration.
The text was updated successfully, but these errors were encountered:
xmh0511
changed the title
[dcl.meaning.general] p3.3 The lookup for the declarator-id that is an identifier in the explicit instantiation or a partial or explicit specializatio
[dcl.meaning.general] p3.3 The lookup for the declarator-id that is an identifier in the explicit instantiation or specialization for function template
May 29, 2022
Consider this example:
We do not restrict more requirements on the name lookup for
fun
. The result should consist of#1
and#2
. [temp.deduct.decl] p1 saysIt is not clear whether the declarator-id that is an identifier refers to a specialization of a function template or not. We just say
in [temp.names] p1. The identifier refers to a specialization only if the deduction succeeds, I think. [temp.deduct.decl] p1 also says
This implies that only function templates are considered when identifying any function template specialization.
[dcl.meaning.general] p3.3 might be changed to
change [temp.deduct.decl] p1 to
The text was updated successfully, but these errors were encountered: