Q:

Why am I getting a type value mismatch?

I am trying to make a vector of iterators in my C++ application:
std::vector<std::list<std::shared_ptr<SelfDefinedType>>::iterator> edge_iters;

SelfDefinedType is a class I declared somewhere above this snippet.
I must admit this organization is a bit complicated, but there is a hierarchical structure to the templating.
I am getting the following compile-time error compiling with C++11.
App.hpp:563:48: error: type/value mismatch at argument 1 in template 
parameter list for ‘template<class _Tp, class _Alloc> class std::vector’

What does this mean? It seems to be treating std::list<std::shared_ptr<SelfDefinedType>>::iterator as a value instead of a type. Why?
I tried to add spaces to the beginning and end brackets to no avail. I also tried to use typedef to suppress compilation errors, which didn't work.

A:

You should specify that std::list<std::shared_ptr<SelfDefinedType>>::iterator is a type.
Here iterator is nested inside std::list<std::shared_ptr<SelfDefinedType>> and SelfDefinedType is a template parameter.
The parser assumes iterator is not a type, unless you tell it explicitly with typename.
To solve the error (note the typename):
std::vector<typename std::list<std::shared_ptr<SelfDefinedType>>::iterator> edge_iters;

