Topic: typeid operator and inheritance


Author: marc@offline.be (Marc Duponcheel)
Date: 1 Sep 93 00:07:14 PST
Raw View
In article <9324315.2997@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
> mbr@bellcore.com (Mark Rosenstein) writes:

> >employee *fred = new typeid(*pe);

I don't know anything about the typeid operator but I was wondering if the
following holds:

class B {} b;
class D : public B {} d;

typeid(b) < typeid(d)

 -- marc.

################################################################################
 email  preferred address    marc@offline.be [= me@home]
           aka               marc@offline.UUCP ub4b!offline!marc offline!marc
        if [me@home] fails   mdu@abacus.be [= me@brussels.work]
           or                mdp@cimad.be  [= me@antwerp.work]
 fido   2:292/603.26  Marc.Duponcheel@p26.f603.n292.z2.FidoNet.Org [= me@home]
 bix    mduponcheel   mduponcheel@BIX.com [= me@home]
################################################################################