I've tried to construct an example here. I'm not sure I've faced the same issues you have(since you didn't provide a way to reproduce them) but I think there were two different problems: The first one, very common, is that PhoenixV2 does not work with "modern compilers" since the breaking change in Boost 1.52 that made BOOST_RESULT_OF_USE_DECLTYPE
the default.
There are two ways to solve this (at least with the clang version that coliru uses) either use V3 by defining BOOST_SPIRIT_USE_PHOENIX_V3
(this is what I would recommend, and I think it should be the default) or return the result_of protocol to the behaviour V2 expects by defining BOOST_RESULT_OF_USE_TR1
. The second problem, of which I'm not as familiarized so take this with a grain of salt or simply wait for an answer from "someone" more experienced, is that it seems that you can't pass string literals directly as an inherited attribute, you need to pass them as a string (using phx::val("foo") also seems to work).
Short version: Define BOOST_SPIRIT_USE_PHOENIX_V3 and pass your inherited attributes as a std::string not as a string literal.