My guess: you forward declared class M somewhere, and only declared it fully after the template instantiation.
My hint: give your formal template arguments a different name than the actual ones. (i.e. class M)
// template definition file
#include <list>
template< class aM, class aT >
class C {
std::list<M> m_List;
...
};
Example of a bad forward declaration, resulting in the mentioned error:
// bad template usage file causing the aforementioned error
class M;
...
C<M,OtherClass> c; // this would result in your error
class M { double data; };
Example of proper declaration, not resulting in the error:
// better template usage file
class M { double data; }; // or #include the class header
...
C<M,OtherClass> c; // this would have to compile