C++ Standard
Section 14/2 :
In a function template declaration, the declarator-id shall be a template-name (i.e.,
From C++ Templates: The Complete Guide By David Vandevoorde, Nicolai M. Josuttis
8.3
Explicit template arguments: A template name can be followed by explicit template argument values enclosed in angle brackets. The resulting name is called a template-id.
For example:
template
struct Demo{
// ...
};
int main()
{
Demo d; // Demo is the template name, Demo is the template-id
// ...
}
In a function template declaration, the declarator-id shall be a template-name (i.e., not a template-id).
For example (from what I have understood):
class A {
public:
template void f(T);
template struct X { };
};
class B : public A {
public:
using A::f; // fine
using A::X // fine
};
class C : public A {
public:
using A::f; // ill formed, declarator-id shall not be a template id
using A::X // ill formed, declarator-id shall not be a template id
};
Someone please correct me if I am wrong.