Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-10-01 05:21:51


Pavel Kuznetsov wrote:
>
> That was not an assertion, but rather just a guess just in case that
> usage of #if defined(__SUNPRO_CC) in the line mentioned:
>
> #if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= x530)
>
> is not intended to keep compiler from issuing this kind of warning.

Yes it is.

> So now I see these alternatives to keep that warning quiet:
>
> 1) Require checking whether symbol is defined before using
> BOOST_WORKAROUND. Not that good thing since it compromises the very
> purpose of this macro. Currently involves about 240 replacements in
> about 95 header files across all the boost libraries. Ugh, of course
> nobody will like it.
>
> 2) Guard all the headers in question with #pragmas. Requires
> modification of about 60 header files.
>
> 3) Provide some kind of prolog/epilog header files and encapsulate
> the code switching and restoring the warning(s) back on there.
> Somewhat better than (2), though of course it is not perfect. One of
> the advantages of this approach is its scalability: if there will be
> a need for the boost to say suppress some another warning across all
> the library files it always will be possible to just include the code
> in those files. Efforts required are about the same as in (2).
>
> 4) Forget modifying boost and manage the problem mentioned on the
> client side. Involves providing forwarding headers for about 60 of
> the boost headers. Efforts required are about the same as in (1) and
> (2) but multiplied by the number of users who does it. On the other
> hand it seems that so far I am the first who is concerned about the
> problem, am I not?..
>
> Given this I would prefer to do the job required for (3), but if the
> boost community will oppose, I'll go (4).
>
> What do you think?

The only viable alternative for users that prefer -Wundef is (1).


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