|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2002-08-07 22:07:00
"Philippe A. Bouchard" <philippeb_at_[hidden]> wrote in message
news:aisbk6$ql4$1_at_main.gmane.org...
> >[...]
> > Isn't it true that get_type_id() make assumptions about the binary
layout
> > of the class? That is undefined, let alone non-portable.
>
> Is it a compile-time defined token, not a binary dependency.
> [...]
If I understand correctly, you assume that the type id is stored sizeof(int)
bytes before the object. First, I don't see how this could possibly be
true,
and second, I don't see how this could possible be defined. There are
very few guarantees about memory layout, and I don't think any of them
cover your uses. If I don't understand your code correctly, perhaps you
can explain it in great detail.
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk