You need to use typedef typename
instead of typename
.
The way you wrote the code, you are telling the compiler that the PriorityQueueInterface has a member called iterator and a member called const_iterator.
By using typedef typename
you will tell it it has a type called iterator and a type called const_iterator
.