Reputation: 1616
According to [temp.spec] p4, a specialization is a class/function/[...] that is instantiated, or explicitly specialized. [temp.expl.spec] p19 states that some explicit specializations are templates, which leads me to believe that explicit specializations are specialization (in the "entity generated from a template" sense), and not templates (sometimes).
My question is, are explicit specializations actual concrete entities (class/function/[...]), or are they templates. If not, what exactly are they of they aren't templates or specializations (following the definition provided by [temp.spec] p4)
Upvotes: 1
Views: 80
Reputation: 473407
Your question assumes a binary status that need not exist, that an explicit specialization is either a template or a "concrete entity".
An explicit specialization may or may not be a template. A non-template explicit specialization is a specialization. As stated in the very text you quote:
A specialization is a class, variable, function, or class member that is either instantiated or explicitly specialized.
Thus, explicit specializations behave like specializations. Template instantiation (implicit or explicit) creates specializations, unless the parameters match an explicit specialization. So instead, that is what gets used. But whether generated by an instantiation or by explicit specialization, specializations are treated as specializations.
So for example, different explicit specializations of the same function template are handled, not through overload resolution rules, but through template argument deduction. This is no different from any other case of specialization of that template.
Upvotes: 2