我想做
typedef deque type; //error, use of class template requires template argument list
type<int> container_;
但那个错误阻止了我。我该怎么做呢?
你不能(直到 C++0x)。但可以用以下方法来模拟:
template<typename T>
struct ContainerOf
{
typedef std::deque<T> type;
};
used as:
ContainerOf<int>::type container_;
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)