代码拉取完成,页面将自动刷新
//
// Created by light on 19-11-3.
//
#include <vector>
using namespace std;
// 不可以对alias template做偏特化或全特化
template<typename T>
using Vec=vector<T, allocator<T>>; // alias template using新用法
//# define Vec<T> template<typename T> vector<T, allocator<T>> // 使用宏不行
int main() {
Vec<int> col;
// 如果使用宏上述会被替换为template<typename int> vector<int, allocator<int>> error 不是我们想要的
// typedef vector<int, allocator<int>> Vec; // typedef也无法做到,没法指定模板参数
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。