|
Boost Users : |
From: Wu Yinghui, Freddie (yhwu_at_[hidden])
Date: 2006-08-15 21:49:44
> On 8/14/06, Wu Yinghui, Freddie <yhwu_at_[hidden]> wrote:
>> Hi all,
>>
>> I guess this question could have been asked before. But I've failed to
>> find an answer from my basic search from the web so far. So please try
>> to bear with me if it is old stuff.
>>
>> Our development environment is using MSVC71 at the moment, and our
>> coding standard requires warning level 4 and 64-bit compatiblity check
>> of the compiler. But whenever I use some of the Boost library headers
>> (most notably Boost.Function, Boost.Integer and Boost.uBLAS for now, and
>> we have not started using most of the other libraries yet), there are
>> tons of warnings from the compiler.
>>
>> As our development team view compiler warnings as important signs of
>> potential problems in our own code, we'd like to suppress warnings from
>> Boost headers (assuming that they are at least better tested than our
>> code).
>>
>> So my question is: Is there a way for us to suppress warnings from Boost
>> headers without affecting the warning level significantly on our own
>> code?
>
> This will make vc++ treat a header with warning level 3:
>
> #pragma warning(push, 3)
>
> #include <some/boost/header.hpp>
>
> #pragma warning(pop)
>
Thanks for your quick reply. I knew this trick. But what I want is
probably some more elegant ways of doing this. (It seems quite a bit of
a trouble since those pragmas will generate lots of warnings when I
build using gcc. And if I have to surround each of those pragma with
platform detection macros, it will end up quite a few lines for each of
my hundred header/source files.)
Any easier-to-adopt ideas? :)
Cheer,
Freddie
-- Wu Yinghui, Freddie Research & Development Software Engineer Volume Interactions Pte Ltd 1 Kim Seng Promenade, #12-01 Great World City East Tower Singapore 237994 Tel: +65 62226962 (Ext 216) Fax: +65 62226215 Email: yhwu_at_[hidden] URL: http://www.volumeinteractions.com Important: This message is intended for the recipient(s) addressed above. It contains privileged and confidential information. If you are not the intended recipient, please notify the sender immediately by replying to this message and then delete it from your system. You must not read, copy, use, or disseminate this communication in any form. Thank you.
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