I can't understand why the standard first defines template instantiation for templates as follows N3797::14.7/4 [temp.spec]
:
The act of instantiating a function, a class, a member of a class template or a member template is referred to as template instantiation.
But further everywhere it uses the instatiation of the specialization, like the following N3797::14.7/4 [temp.spec]
:
An instantiated template specialization can be either implicitly instantiated (14.7.1) for a given argument list or be explicitly instantiated (14.7.2).
I don't understand that. A template itself is a different concept than the template specilization, which could be an explicit specialization
or a partial specialization
. For instance N3797::14.5.5/1 [temp.class.spec]
:
The primary template shall be declared before any specializations of that template.
My question is about why the Standard first declare the instatiation
concept for templates, but further it applies that concept for template specializations?
Moreover N3797::14.7/4 [temp.spec]
defines the specialization concept as follows:
A specialization is a class, function, or class member that is either instantiated or explicitly specialized (14.7.3).
So, the partial specialization is not a specialization, is it? I'm totally confused by those concepts. Couldn't you clarify it a bit?