【发布时间】:2011-01-08 12:03:55
【问题描述】:
可能重复:
Is it possible to write a C++ template to check for a function's existence?
是否可以使用 boost 类型特征或其他机制来检查特定模板参数是否具有运算符/函数,例如std::vector 作为模板参数有operator[],而std::pair 没有。
【问题讨论】:
标签: c++ class templates typetraits