摸板的一些内容

1.   template<typename T>  

   template<class T >

<c++程序设计>

区别在于,typename 的概念比class更宽泛,不仅包括由类定义引进的类型的名字,还包括语言的内部类型,枚举,typedef引进的名字etc

<MSDN>

typename identifier;

Use this keyword only in template definitions. This keyword tells the compiler that an unknown identifier is a type. For example:

template<class T> class X {
   typename T::Y;      // treat Y as a type
   
   Y m_y;
};

This keyword can also be used in place of class in template parameter lists. For example, the following statements are identical:

template<class T1, class T2>...
template<typename T1, typename T2>...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值