|
|
Warp wrote:
> units), it will still return the correct typeid name depending on whether
> the object is really of type Alpha or of type Beta.
Does the typeid tell you anything but basically the name? It looks like
there's just a textual name and a total (but otherwise undefined) ordering
on types. No way to actually use the type information to do something I'd
consider useful. Is this the sort of thing that compilers extend, or is the
only actual use to get the name of the type or compare types in a template?
It doesn't really look like the type information lets you do much with the
contents of the type. It doesn't tell you anything about the type - it just
tells you the ID of the type. It doesn't tell you how big it is, or which
members are pointers, or anything like that that would let you do something
like serialize the data out to a file. That's usually what I think of when I
hear "run-time type information". Not "I can compare two values in a
statically-typed language and see if they're the same type." :-)
--
Darren New, San Diego CA, USA (PST)
My fortune cookie said, "You will soon be
unable to read this, even at arm's length."
Post a reply to this message
|
|