#include <list>
usingnamespace std;
template<typename T>
class mylist : public list<T> {
typedef list<T> super;
public:
void my_pop_front() {
pop_front();
}
};
int main() {
}
since the superclass method should be available for the derived class,
and pop_front() is a method of list
why compile error?
I don't understand what the error mean:
G:\workspace\test3\test3.cpp: In member function 'void mylist<T>::my_pop_front()
':
G:\workspace\test3\test3.cpp:23:14: error: there are no arguments to 'pop_front'
that depend on a template parameter, so a declaration of 'pop_front' must be av
ailable
G:\workspace\test3\test3.cpp:23:14: note: (if you use '-fpermissive', G++ will a
ccept your code, but allowing the use of an undeclared name is deprecated)