cplusplus / CWG

Core Working Group
23 stars 7 forks source link

[dcl.meaning.general] p3.3 The target scope of an explicit instantiation, a partial or explicit specialization is underspecified #494

Open xmh0511 opened 5 months ago

xmh0511 commented 5 months ago

Full name of submitter (unless configured in github; will be published with the issue): Jim X

[basic.scope.scope] p2.9 says:

Friend declarations and declarations of qualified names and template specializations do not bind names ([dcl.meaning]); those with qualified names target a specified scope, and other friend declarations and certain elaborated-type-specifiers ([dcl.type.elab]) target a larger enclosing scope.

However, [dcl.meaning.general] p3.3 does not specify what the target scope is for an explicit instantiation, a partial or explicit specialization

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]).