Boost logo

Boost :

From: Jens Maurer (jmaurer_at_[hidden])
Date: 2000-05-26 16:09:27


Due to Microsoft's Windows C header braindamage, nearly every compiler
on Microsoft Windows defines _MSC_VER, so that the "real" Microsoft
C++ compiler can only be detected by excluding all other possibilities.
We do that in config.hpp.

Sometimes, it does not seem worthwhile to add another config option
to config.hpp just to work around some obscure MSVC C++ implementation
bug in test programs or other examples accompanying a library. However,
as stated in the first paragraph, it is difficult to special-case
MSVC (only).

Thus, I suggest addding a "BOOST_MSVC" define to the relevant
section of config.hpp. This flag shall state that the current
compiler is indeed MSVC (and not Borland or any other which defines
_MSC_VER).

It shall be strongly discouraged to use BOOST_MSVC in a public
header file; invent a new #define which more precisely states
the bug being worked around instead.

All this is only a problem with MSVC, the other compilers
have unique preprocessor symbols such as __GNUC__ or __BORLANDC__.

Jens Maurer


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk