【发布时间】:2018-12-03 07:09:22
【问题描述】:
我从cppreference复制了这个块
template<class T>
struct Alloc { };
template<class T>
using Vec = vector<T, Alloc<T>>; // type-id is vector<T, Alloc<T>>
Vec<int> v; // Vec<int> is the same as vector<int, Alloc<int>>
我不明白为什么template<typename T> 声明了两次?
如果template<typename T> 声明属于下面的行,则必须以某种方式限定范围。
【问题讨论】: