This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: typeid
- To: "Evgenii B. Rudnyi" <rudnyi at comp dot chem dot msu dot su>
- Subject: Re: typeid
- From: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Date: Tue, 18 Jan 2000 01:15:08 -0600 (CST)
- cc: cygwin at sourceware dot cygnus dot com
On Sat, 15 Jan 2000, Evgenii B. Rudnyi wrote:
> #include <typeinfo>
> #include <iostream>
>
> class test {};
>
> class long_test {};
>
> int main()
> {
> test a;
> long_test b;
> cout << typeid(a).name() << endl;
> cout << typeid(b).name() << endl;
> return 0;
> }
>
> under the original gcc in the Cygwin B20.1 and under gcc 2.95.2
> (Mumit Khan) is as follows
>
> 4test
> 9long_test
>
> where there is a number (number of bytes in the name, as far as I
> understand) before a class name.
>
> Is it a feature or a bug?
Feature. See the C++ standard for more information on what compilers
are required to produce (hint: unique names, but not necessarily what
you would like to see).
Please follow up in a C++ specific forum if you have more questions.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com