I have the following header file:

Qt Code:
  1. #include <list>
  2. using namespace std;
  3.  
  4. template <class T>
  5. class QuickList {
  6. public:
  7. // Some public things
  8.  
  9. private:
  10. list<T> _theList;
  11. mutable list<T>::iterator _currentPointer;
  12. };
To copy to clipboard, switch view to plain text mode 

When I try to compile, I get the following errors (line numbers changed to correspond with the code above:

In file included from quicklist.cpp:1:
quicklist.h:11: error: type `std::list<T, std::allocator<_CharT> >' is not derived from type `QuickList<T>'
quicklist.h:11: error: ISO C++ forbids declaration of `iterator' with no type
quicklist.h:11: error: expected `;' before "_currentPointer"
I need the mutable keyword if I want to keep my consts intact. However, if I remove it, I still get this single error:

In file included from quicklist.cpp:1:
quicklist.h:11: error: expected `;' before "_currentPointer"
I don't understand these errors. What am I doing wrong?

Could someone help me with this?

Thanks!