列表参数的类型定义
Typedef for list parameter
我想要实现 typedef
,如下例所示。但是,编译器不会运行这个。是否可以实施?如果没有,还有其他选择吗?
typedef <char, int> myDefs;
map<myDefs> myMap;
template <template <typename...> class Map>
using with_my_defs = Map<char, int>;
用法:
with_my_defs<map> myMap;
我想要实现 typedef
,如下例所示。但是,编译器不会运行这个。是否可以实施?如果没有,还有其他选择吗?
typedef <char, int> myDefs;
map<myDefs> myMap;
template <template <typename...> class Map>
using with_my_defs = Map<char, int>;
用法:
with_my_defs<map> myMap;