- 博客(1)
- 收藏
- 关注
原创 模板参数为数组
template void test( T a) { cout<<typeid(a).name()<<endl; //这里显示是 int* 数组退化了 } template void test1(T& a) { cout<<typeid(a).name()<<endl;//因此当按引用传递时,a被解析为数组,数组没有退化为指针。 } int main() { int b[]={1,
2018-02-05 15:25:18
784
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人