
Rene Rivera <grafik.list@redshift-software.com> writes:
Gennaro Prota wrote:
Hi guys,
could we please add something like this to the config system?
#if defined(__GNUC_PATCHLEVEL__) # define <choose_a_name> ( __GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__ ) #else # define <choose_a_name> ( __GNUC__ * 10000 \ + __GNUC_MINOR__ * 100) #endif
PS: of course it's possible to "share" the common part of the replacement-lists:
( __GNUC__ * 10000 + __GNUC_MINOR__ * 100)
or
(100 * ( __GNUC__ * 100 + __GNUC_MINOR__))
The decision is up to John :)
I've been working on making such changes for some time now <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?BoostConfig>. But it's very slow going as I have almost no free time.
This is great and very complete. It looks like you've worked things out so completely that actually doing the coding should be pretty easy. There is one nit:
Some compilers, like Comeau C++, try and simulate other compilers. For them it is possible that some workarounds are dependent on the particular version of the compiler they are emulating. Here's some of those issues, as they come up:
* boost/config/compiler/comeau.hpp - It emulates VC, and has the _MSC_VER define.
* boost/config/compiler/intel.hpp - It emulates VC, and has the _MSC_VER define.
The only option I can think of is to go ahead and define the corresponding version macro and have the code deal with the multiple defs.
If I understand what you're suggesting correctly, I don't think that part is a very good idea, because the status quo is that Boost libraries expect BOOST_MSVC only to be defined when it really _is_ MSVC, and we go to some lengths to ensure it. I don't mind the idea of BOOST_CXX_EMULATED_MSVC or BOOST_CXX_MSC_VER though. -- Dave Abrahams Boost Consulting www.boost-consulting.com