Re: [Cppunit-devel] config.h changes committed
Brought to you by:
blep
|
From: Baptiste L. <bl...@cl...> - 2001-06-18 19:36:08
|
----- Original Message -----
From: "Steve M. Robbins" <ste...@vi...>
To: <cpp...@li...>
Sent: Monday, June 18, 2001 7:20 PM
Subject: Re: [Cppunit-devel] config.h changes committed
> On Mon, Jun 18, 2001 at 05:16:36PM +0200, Baptiste Lepilleur wrote:
> > Quoting "Steve M. Robbins" <ste...@vi...>:
> > OK. I did know what's was behind the RTTI thingy (kinda strange, I did
not
> > though that you could have the type_info without dynamic_cast).
>
> All I'm saying is that the macro defines HAVE_RTTI based on the
> presence of typeid(). You are probably right that dynamic_cast is
> present if typeid() is present; I don't know much about RTTI. It may
> be that the reverse is not true, however. My instinct is to assume
> dynamic_cast is available, if needed, (and without checking) until
> someone tells us otherwise.
OK.
> > Well, I propose to keep USE_TYPEINFO.
> >
> > Our USE_TYPEINFO could be defined as: you have typeinfo, and the
name()
> > methode return a human readable name (that last one can't be tested by a
> > machine unfortunately). So it's a stronger requirement than HAVE_RTTI.
>
> It's true that GCC can produce an ungainly type name like
>
>
t23Triangle_3_Plane_3_test1ZQ24CGALt11Homogeneous2ZQ24CGAL4GmpzZQ24CGALt8Quo
tient1ZQ24CGAL4Gmpz.point_intersection
Yuck!!! Baastian, did you look up an explanation for this from the gcc
folks ? (name are still useful for debugging)
> so the idea of perhaps not using that name has merit. In that case,
> the symbol might be more appropriately-named USE_TYPEINFO_NAME. You
> may still wish to use type_info structures to test equality of
> types.
I agree, that name reveal the intention better.
>
> I'll have to think about this. There seem to be relatively few uses
> of using type_info::name() at present, and I'm puzzled by some of them.
>
> For example, what is the purpose of class CppUnit::TypeInfoHelper? Is
> there some advantage to using a class rather than a simple function
> CppUnit::getClassName() ?
Yes. I though that the class would grow, but it did not. Actually, isn't
that the only use of name() ?
Baptiste.
---
Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html
Author of The Text Reformatter, a tool for fanfiction readers and writers.
Language: English, French (Well, I'm French).
|