|
Boost Users : |
From: Kesseli Pascal (pascal_kesseli_at_[hidden])
Date: 2008-07-31 13:24:49
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" <joel_at_[hidden]> schrieb im Newsbeitrag
news:<g6pu9q$r4b$1_at_[hidden]>...
> 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net