Home > Back-end >  Why should the grammar of the template in the beginning the template <typename T>
Why should the grammar of the template in the beginning the template <typename T>

Time:01-24

 
Template
Class A
{
T a (T);
}
Template
T A: : A (T)
{
}

A a;

Why will template In the beginning?
Why shouldn't it? In grammar?
 
The class A
{
T a (T);
}

T A : : a (T)
{
}

A a;

So don't agree statements define the format of the call, also simple,
Would you please tell me what the reason template such grammar?

CodePudding user response:

Tortoise ass - turtle MAO,
C # generics is similar to what you say, c + +, after all, the birth of nearly 40 years, in the 80 s had a generic, estimates that at that time the compiler is unable to process your said,

CodePudding user response:

The somebody else is so of the regulation, have what way
  • Related