Re: [Boost-users] Boost spirit: overlapping inner struct result
Hi Joel
Thanks for your reply. That simple example you stated compiles fine, though.
Is it possible that the templates might have ane impact here?
"Joel de Guzman"
Pascal Kesseli wrote:
Hi everyone
When trying to compile the serialization library for my Montavista embedded computer, I am getting a strange error message concerning boost spirit/core/primitives/numerics.hpp stating that struct result in sign_parser has already been defined before.
Back then, I couldn't deny that fact, as result is already defined in sign_parser's superclass parser, so I renamed the struct in the subclass to tresult and the library compiled fine.
Currently, I am asking myself what influence such a change might have on
the running program. I am having unexplainable SIGABRT signals appearing and killing my program, thus I suspect my change was not that mere after all.
Is there a better workaround I could use to solve this problem?
Thanks in advance for your replies and best regards
I don't quite understand what's happening here. It shouldn't be an error if a base class and a subclass share the same result struct. Try this short example:
struct x { struct result { typedef int type; }; };
struct y : x { struct result { typedef double type; }; };
Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net
participants (1)
-
Kesseli Pascal