|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-12-12 22:38:39
"Paul Mensonides" <pmenso57_at_[hidden]> writes:
> ----- Original Message -----
> From: "David Abrahams" <dave_at_[hidden]>
>
>> > I was under the impression that causing errors and/or warnings was so
>> > developers could be "reminded" of some type of hack for some compiler.
> The
>> > macro could be conditionally be defined based on whether or not you want
>> > those notifications. Issuing a warning or error on a user's system is
>> > pointless (IMHO) unless a new release no longer supports the "hack." In
>> > which case, they'd get compile-time errors anyway.
>> >
>>
>> So, should we have another macro:
>>
>> BOOST_WORKAROUND_CURRENT(__SUNPRO_CC, 0x530)
>>
>> ??
>>
>> or, can you find a way to make:
>>
>> BOOST_WORKAROUND(__SUNPRO_CC, BOOST_CURRENT_VERSION(0x530))
>>
>> work?
>
> I'm not sure what you mean here. You mean overloading
> "BOOST_WORKAROUND" to cause an error (or warning) if you use
> "BOOST_CURRENT_VERSION"? That's no problem at all.
I mean that
#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_CURRENT_VERSION(0x530))
whatever
#endif
would have the effect of
#if __SUNPRO_CC != 0
# if BOOST_DETECT_OUTDATED_WORKAROUNDS && __SUNPRO_CC > 0x530
# error or warning
# endif
whatever
#endif
While keeping the current semantics for normal uses of
BOOST_WORKAROUND
And, BTW, can you show us how to do it?
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk