【发布时间】:2010-07-13 10:49:04
【问题描述】:
如果指向用户定义类型的指针作为模板参数传递给模板类,是否可以获得参数的类类型?
template <class T> struct UserType {
typedef T value_type;
...
};
int main () {
typedef std::vector<UserType<double>*> vecType
vecType vec;
vecType::value_type::value_type m; //how to get the double here?
return 0;
}
【问题讨论】: