[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Union Type Object problem
From: |
Laurence Finston |
Subject: |
Re: Union Type Object problem |
Date: |
Sat, 07 Aug 2004 22:05:47 +0200 |
User-agent: |
IMHO/0.98.3+G (Webmail for Roxen) |
I haven't had a chance to test this, but nothing else leapt out at me as a
probable cause for the error.
> > You could just use `void*' and cast the pointers to
> >`Expression*' in the rules. That's what I do.
>
> I think that one might loose polymorphy that way, or only preserve it in a
> non-C++ standard way (it might not run on some C++ compilers).
>
If I cast a pointer to void to a base type with virtual functions, and the
object pointed to is a derived type, a call to a member function on the object
will resolve correctly. I don't see how this loses polymorphism, nor how
it could fail to compile.
I don't see anything wrong with your solution either, beyond what you mention
yourself. If the data members in the class were large, I might use pointers.
I doubt that a semantic type containing five or six pointers would cause
problems on typical systems today.
Laurence
- Union Type Object problem, Enrico Oliosi, 2004/08/05
- AW: Union Type Object problem, Olav Groehn, 2004/08/05
- Re: Union Type Object problem, Hans Aberg, 2004/08/05
- Re: Union Type Object problem, Laurence Finston, 2004/08/05
- Re: Union Type Object problem, Laurence Finston, 2004/08/05
- Re: Union Type Object problem, Hans Aberg, 2004/08/06
- Re: Union Type Object problem,
Laurence Finston <=
- Message not available
- Re: Union Type Object problem, Hans Aberg, 2004/08/09
- Re: Union Type Object problem, Laurence Finston, 2004/08/08
- Re: Union Type Object problem, Hans Aberg, 2004/08/09
- Re: Union Type Object problem, Laurence Finston, 2004/08/09
- Message not available
- Re: Union Type Object problem, Hans Aberg, 2004/08/10
- Re: Union Type Object problem, Laurence Finston, 2004/08/10
- Message not available
- Re: Union Type Object problem, Hans Aberg, 2004/08/11
- Re: Union Type Object problem, Laurence Finston, 2004/08/12
- Re: Union Type Object problem, Hans Aberg, 2004/08/12
- Re: Union Type Object problem, Laurence Finston, 2004/08/12