Principal here is:
- Making sure each template instantiation implies use of the most specialized template. As explicit instantiations/specializations are not redeclarations of the primary template.
- Introducing a use from explicit instantions/specializaitons to the primary template, as they're required but not traversed as part of the RAV.
We could consider the other order:
To me this feels a bit more like there's an obvious principle and less like case bashing.
Concretely I think the difference is that we now report the pattern rather than the specialization for explicit template instantiations. As discussed offline, I'm not very familiar with the patterns where explicit instantiations are used. But it seems at least ambiguous whether a visible explicit instantiation is semantically significant, whereas it's clear that the pattern is important. So I think preferring the pattern here would be slightly better too, up to you.