【发布时间】:2012-10-27 14:31:05
【问题描述】:
目前我有两个功能:
template<typename Type> bool f(Type* x);
template<typename... List> bool f(std::tuple<List...>* x);
有什么方法可以将这两个函数与一个额外的模板参数合并,该参数指示传递的类型是否为元组?
template<typename Type, bool IsTuple = /* SOMETHING */> bool f(Type* x);
【问题讨论】:
标签: c++ templates c++11 tuples typetraits