Re: [Cppunit-devel] config.h changes committed
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2001-06-18 15:16:42
|
Quoting "Steve M. Robbins" <ste...@vi...>: > On Mon, Jun 18, 2001 at 09:03:04AM +0200, Bastiaan Bakker wrote: > I am suggesting to eliminate one symbol in favour of the other. > If I have to choose, I would keep HAVE_RTTI because it has some > precedence: it comes from the autoconf macro archive. But I can > see reasons for preferring to keep USE_TYPEINFO. 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). 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. > > When you want maximum portability, you want to disable both. > > I think it is more correct to say, "for maximum portability, you want > the library to work in both the presence and the absence of HAVE_RTTI". The library works on both, but some features won't be available (name extraction from type. We had rather lengthy discussion about this with Baastian a while back). The good things is that is you are using the macro, you don't have to care. So if I have a crossplatform project, I can remove USE_TYPEINFO support to make sure than only portable features are used. > The symbol HAVE_RTTI is checked for and set automatically at > installation time. Assuming it replaces USE_TYPEINFO, HAVE_RTTI > should not be an option for the library user. That is, it should not > appear in <cppunit/Portability.h>. Among other reasons, you can run > into trouble if the installer builds with HAVE_RTTI = 1 (enabling RTTI > in the library .cpp files), and the user includes <cppunit/foo> with > HAVE_RTTI = 0 (not using RTTI in some inlined functions). Or > vice-versa. I agree --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French |