Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2008-07-30 10:34:27


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