Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-12 08:06:51

Edward Diener <eddielee_at_[hidden]> writes:

> one could create a series of macros, let us say for VC71, like this:
> // These are always defined and included in a header file at the top of
> select_compiler_config.hpp

It's a lot more complicated than that, unfortunately, because many
other compilers define _MSC_VER to "act compatible" with VC++.

> You could now say:
> // code
> #endif
> or, in a different situation:
> #if
> // code
> #endif
> or, in a different situation:
> #if BOOST_COMPILER_VC71 // and any other combinations you like
> // code
> #endif

Okay, I understand what you're driving at. I'm not sure if going down
this road is worth the trouble, but if it is, I'd rather see a
standard system for referring to versions numerically. So, for

        Version Value
        ------- -----
        6.0 060000
        6.0sp5 060005
        7.0 070000
        7.1 070100
        5.3.4 050304
        3.4.3 030403
        2.95.3 029503

I don't particularly think


is more expressive than


Nor do I think


is an improvement over


> If you are arguing for only using BOOST_WORKAROUND, and never using
> a construct like the last one

Among other things, I am.

> then you are advocating always using specific version numbers.

I don't know what you mean.

> In that case you may want to consider at least forms like
> useful for your BOOST_WORKAROUND and BOOST_TESTED_AT macros.

I understand why you want it, but am not fond of your proposed names
and syntax.

> Of course you would have the same macros for each compiler/version

As I'm sure you know, I do think there should be a separate macro for
each compiler, explicitly #defined to 0 when that compiler is not in

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at