我想使用模板函数确定类型是否为const,例如:
template <typename TTYPE> bool IsConst(TTYPE) {return false;} template <typename TTYPE> bool IsConst(const TTYPE) {return true;}
但这不起作用,任何替代建议?
c++ templates const
c++ ×1
const ×1
templates ×1