Parser.h
does not define the struct, it forward-declares it. Therefore it's incomplete when you try to use it as a template parameter for the stack
, and you can't use incomplete types as parameters for STL containers:
C++11 draft 3035, 17.4.3.6, paragraph 2:
In particular, the effects are undefined in the following cases:
...
if an incomplete type (3.9) is used as a template argument when instantiating a template component, unless specifically allowed for that component.
You can check this out for reasoning.