I can't use the std container iterator in a template class.
I get this errors :
error C2061: syntax error : identifier 'iterator'
error C2238: unexpected token(s) preceding ';'
Here the source code:
#include <list>
#include <functional>
#include <memory>
template<typename TParam>
class MyClass
{
public:
using TFunction = std::function<void(TParam)>;
using TContainer = std::list<TFunction>;
using TIterator = TContainer::iterator; // compilation error here!
};
How to use the iterator of the container in the templated class?