Suggested resolution:
I think we should say:
explicit-instantiation:
type-specifier-seqopt
declaratoropt ;
[Steve Adamczyk: presumably, this should have
template at the beginning.]
and then say that:
-
The declarator can be omitted only when the type-specifier-seq
consists solely of an elaborated-type-specifier for a class type, in
which case the instantiation is for the named class. If the
declarator is present the instantiation is for the named entity.
-
The type-specifier-seq can be omitted only when the declarator
is for a constructor, destructor, or conversion operator.
-
The type-specifier-seq cannot define any new types.
There are similar problems in 13.9.4 [temp.expl.spec]:
Here, I think we want:
explicit-specialization:
decl-specifier-seqopt init-declaratoropt ;
with similar restrictions as above.
[Steve Adamczyk: This also needs to have
template <> at the beginning, possibly repeated.]