|
Boost : |
From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2005-12-19 07:08:32
Markus Schöpflin wrote:
> Angus Leeming wrote:
>
>> Something like:
>>
>> #ifdef BOOST_PP_HAS_WARNINGS
>> #warning foo bar
>> #endif
>>
>> where BOOST_PP_HAS_WARNINGS is defined in boost/config/compiler/gcc.hpp
>>
>> ?
>>
>> Or, given the proposed rewrite of the config stuff have the macro
>> defined to 0 for all compilers except gcc and use as #if
>> BOOST_PP_HAS_WARNINGS
>
> I don't think this will help, because the preprocessor seems to scan the
> whole file.
Interesting. We've used that solution for ever with LyX and I never had a
problem with my (admittedly old) version of DEC's cxx. That machine is now
history however.
Presumably, therefore, the solution is to define BOOST_WARNING(text) which
expands to nothing with all compilers except gcc for which it expands to
#warning text.
Angus
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk