A
andy660
#include <list>
template <class TYPE, class ARG_TYPE = const TYPE &>
class CList
{
private:
typedef std::list<TYPE>:
ointer pointer;
};
when I compiled it with g++, it told me that "type 'std::list<TYPE,
std::allocator<_CharT> >' is not derived from type 'CList<TYPE,
ARG_TYPE>'"
Who can tell me why?
template <class TYPE, class ARG_TYPE = const TYPE &>
class CList
{
private:
typedef std::list<TYPE>:
};
when I compiled it with g++, it told me that "type 'std::list<TYPE,
std::allocator<_CharT> >' is not derived from type 'CList<TYPE,
ARG_TYPE>'"
Who can tell me why?