感谢版主的提醒,通过下面的例子,得出是等效的:
#include<iostream>
using namespace std;
template <class T>
struct node
{
int data;
node*p;
node<T>*r;
};
void main()
{
node<int> one;
cout<<typeid(one.p).name()<<endl;
cout<<typeid(one.r).name()<<endl;
node<double>two;
cout<<typeid(two.p).name()<<endl;
cout<<typeid(two.r).name()<<endl;
}