C++ templates, resolve undefined type in compile-time
===

Let's say I have a template class, `IO<T>` and another template class `MembershipFunction<T>`. I need to have a vector of `MembershipFunction<T>*`s in my `IO` thing, and also a `std::map`  from `std::string` to `MembershipFunction<T>*`. For me, it's impossible to remember things in such a complex code. Especially when working with iterators. So I tried to add some `typedef`s to `IO`. But sounds like the compiler is not able to see nested templates. Errors are listed below. 

What should I do to overcome?


    template <typename T>
    class DLL_SHARED_EXPORT IO
    {
    private:
        typedef std::pair<std::string,  MembershipFunction<T>* > MapEntry; // (1)
        typedef std::map<std::string, MembershipFunction<T>* > Map; // (2)
        typedef std::vector<const MembershipFunction<T>* > Vector; // (3)
        // And so on...

These are errors:

    (1) error: 'MembershipFunction' was not declared in this scope
    (1) error: template argument 2 is invalid
    (1) error: expected unqualified-id before '>' token
    (2 and 3): same errors 


