Article View: comp.std.c++
Article #1941Re: Extended typeinfo (was- dyn
From: Etay Bogner
Date: Sun, 10 Sep 1995 12:53
Date: Sun, 10 Sep 1995 12:53
47 lines
1779 bytes
1779 bytes
In article <n1401567773.54923@taligent.com>, "Bill Gibbons"
<bill_gibbons@taligent.com> wrote:
This probably should be described as a footnote, but
>>
>> class extended_type_info : public type_info {
[ ... ]
>> };
Will require to change the DWP, since type_info is described as :
18.5.1 Class type_info [lib.type.info]
namespace std {
class type_info {
public:
virtual ~type_info();
bool operator==(const type_info& rhs) const;
bool operator!=(const type_info& rhs) const;
bool before(const type_info& rhs) const;
const char* name() const;
private:
type_info(const type_info& rhs);
type_info& operator=(const type_info& rhs);
};
}
meaning, one can't derived from it, since it's the ONLY constructor it has
is private.
Never the less, at a first glance :
>> const extended_type_info &btype =
>> dynamic_cast<const extended_type_info &>(typeid(B));
Seems like a VERY nice syntax indeed.
Etay.
-- Etay Bogner,
-- Etay_Bogner@mail.stil.scitex.com,
-- Scitex Corp.
-- Israel.
---
[ 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:
<Etay_Bogner-1009952125520001@metay_pc.stil.scitex.com>Path:
arc1-ca.pugleaf.net!in1.uu.net!bounce-backReferences:
<n1401567773.54923@taligent.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back Date: 10 Sep 95 12:53:39 GMT Approved: fjh@cs.mu.oz.au From: Etay Bogner <Etay_Bogner@mail.stil.scitex.com> Newsgroups: comp.std.c++ Subject: Re: Extended typeinfo (was- dyn X-Original-Date: Sun, 10 Sep 1995 21:25:52 +0200 Organization: Scitex Corp. Message-ID: <Etay_Bogner-1009952125520001@metay_pc.stil.scitex.com> References: <n1401567773.54923@taligent.com>