相关疑难解决方法(0)

在编译时确定类型是否为STL容器

我想编写一个模板来确定类型是否是编译时的stl容器.

我有以下一点代码:

struct is_cont{};
struct not_cont{};

template <typename T>
struct is_cont { typedef not_cont result_t; };
Run Code Online (Sandbox Code Playgroud)

但我不确定如何创建必要的专业化std::vector<T,Alloc>, deque<T,Alloc>, set<T,Alloc,Comp>等...

c++ templates stl template-meta-programming

18
推荐指数
5
解决办法
1万
查看次数

标签 统计

c++ ×1

stl ×1

template-meta-programming ×1

templates ×1