Although possibly unrelated to OP's original question... this is an error I just had and shows how this error could occur.
When you define a type in a C++ class and you return it, you need to specify the class in which the type belongs.
typedef vector<int> TypeName;
Then GetName() must be defined as:
Otherwise the compiler will come back with the error:
error: 'TypeName' does not name a type