|
Boost Users : |
From: Paul Mensonides (yg-boost-users_at_[hidden])
Date: 2002-11-06 12:53:51
"H. Morishima" <yg-boost-users_at_[hidden]> wrote in message
news:aqa8hd$cue$1_at_main.gmane.org...
> My compiler issues the following warning message
> (boost v1.29.0, G++ 3.2 with warning level high):
>
> boost_1_29_0/boost/type_traits/config.hpp:90:55: warning: "BOOST_MSVC"
> is not defined
>
>
>
> boost/type_traits/config.hpp: line 90 is:
>
> # if (........ || BOOST_MSVC > 1301 || ........)
It should work fine as is.
> Shouldn't it be as follows?
>
> # if (........ || #defined(BOOST_MSVC) && BOOST_MSVC > 1301 || ........)
If an identifier is not defined, it should expand to 0 on a #if (or #elif)
directive line. The only reason you sometimes see what you have above
(minus the extra # before 'defined') is that sometimes the macro actually
expands to 0.
This should be fine:
#if BOOST_MSVC
Provided that either BOOST_MSVC is *not* defined, or it expands to a numeric
expression that the preprocessor can handle.
> H. Morishima
Paul Mensonides
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net