Article View: comp.std.c++
Article #3233Re: Make type_info name() distinct?
From: David Vandevoorde
Date: Sat, 03 Feb 1996 23:50
Date: Sat, 03 Feb 1996 23:50
41 lines
2253 bytes
2253 bytes
Just some personal tastes...
>>>>> "BG" == Bill Gibbons <bgibbons@best.com> writes:
[...]
BG> * How are unnamed types handled? For example:
BG> struct { int x; } y;
BG> typeid(y).name();
BG> (possible answers - implementation dependent
BG> invented names based on ordinals)
How about "#none"?
BG> * How are local types handled? For example:
BG> void f() { struct A { }; typeid(A).name(); }
BG> void g() { struct A { }; typeid(A).name(); }
BG> Are these two names the same?
BG> (possible answers - yes, they are the same
BG> implementation dependent
BG> invented names based on function signature
BG> but only unique for external functions)
I like: "f()::A" and "g()::A" respectively (though I haven't checked
if that may lead to ambiguities or implementation difficulties).
BG> There is some chance that some canonical form will be recommended
BG> in a non-normative annex in the standard.
There was a thread here some time ago concluding that RTTI would be
considerably more convenient for purposes of object persistence and
transportation if this could be standardized somehow.
Daveed
[ 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://reality.sgi.com/employees/austern_mti/std-c++/policy.html
]
Technical Details
Message-ID:
<xsorawcazry.fsf@avs.cs.rpi.edu>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<v01530500ad36a19a2831@[194.163.74.11]> <199602030146.RAA14333@shellx.best.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: vandevod@cs.rpi.edu (David Vandevoorde) Newsgroups: comp.std.c++ Subject: Re: Make type_info name() distinct? Date: 3 Feb 1996 23:50:04 GMT Organization: RPI Computer Science Sender: vandevod@avs.cs.rpi.edu Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <xsorawcazry.fsf@avs.cs.rpi.edu> References: <v01530500ad36a19a2831@[194.163.74.11]> <199602030146.RAA14333@shellx.best.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: avs.cs.rpi.edu In-Reply-To: bgibbons@best.com's message of 02 Feb 1996 17:53:46 PST X-Newsreader: Gnus v5.1 Content-Length: 1287 Originator: clamage@taumet