Article View: comp.std.c++
Article #3029type_info
From: B. Dalton
Date: Wed, 17 Jan 1996 20:22
Date: Wed, 17 Jan 1996 20:22
31 lines
1498 bytes
1498 bytes
The April draft says(see
http://www.cygnus.com/misc/wp/draft/lib-support.html#lib.support
.rtti) about type_info::operator==
bool operator==(const type_info& rhs) const;
Effects:
Compares the current object with rhs.
Returns:
true if the two values describe the same type.
What does "same" mean here? To be specific, say we had
...
class beatha{public:virtual ~beatha(){};}
class duine:public beatha{};
class gael: public duine {};
beatha *pd=new gael;
if(typeid(pd)==typeid(duine)
{ cout<<"duine";
}
...
does "duine" get printed here or not?
--
B. Dalton DEC - Gaillimh
mailto:bdalton@xagony.ilo.dec.com
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<30FD350D.A71@xagony.ilo.dec.com>Path:
arc1-ca.pugleaf.net!fido.asd.sgi.com!austernShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern From: "B. Dalton" <bdalton@xagony.ilo.dec.com> Newsgroups: comp.std.c++ Subject: type_info Date: 17 Jan 1996 12:22:51 PST Organization: DEC Gaillimh Approved: austern@isolde.mti.sgi.com Message-ID: <30FD350D.A71@xagony.ilo.dec.com> NNTP-Posting-Host: isolde.mti.sgi.com X-Original-Date: Wed, 17 Jan 1996 17:42:37 +0000 X-Mailer: Mozilla 2.0b3 (WinNT; I) X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBMP1arky4NqrwXLNJAQETJAH9EhZcPtodimqENiEQDMMuMM0Qx0N3QVg0 JgZ4XFwFgkxiAW30ySNJg3z60FrygLnRas5ERgTrcLLn2T7oeZBWzQ== =IyrT Originator: austern@isolde.mti.sgi.com