Re: [Cppunit-devel] Improving CppUnit portability
Brought to you by:
blep
From: Volker B. <boe...@we...> - 2002-07-15 08:43:17
|
On Wed, 10 Jul 2002, Baptiste Lepilleur wrote: > CppUnit is getting close to having a stable core. I'd like to start > working in an area that has not been really tackled yet: portability. > > First, I'd like to start making up a list of things that need to be done > to make CppUnit more portable. I know some facts, but I hardly have enough > experience to know every compilers oddities. Also, I'd like to get feedback > on your experience in solving some of those issues. I find ACE (http://www.cs.wustl.edu/~schmidt/ACE.html) a very good source on many portability issues. ACE runs on a number of platforms I'ld never like to work on, namely compilers missing namespace or even exception support. ACE uses a lot of preprocessor macros to hide most of the platform differences. I think that's fine given that C++ is not as portable as Java (at least as it would be without the preprocessor trickery...). See e.g. how the configuration item ACE_HAS_ANSI_CASTS from http://cvs.doc.wustl.edu/ace-cvs.cgi/ACE_wrappers/ace/config-g++-common.h is used in http://cvs.doc.wustl.edu/ace-cvs.cgi/ACE_wrappers/ace/config-all.h to define the macro ACE_const_cast(TYPE, EXPR) which expands to the proper const_cast<> on platforms which support it and to old style cast only where necessary. Regards, Volker -- Volker Boerchers, boe...@we... |