Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-07-11 02:30:15


David Abrahams wrote:
> Tobias Schwinger <tschwinger_at_[hidden]> writes:
>
>
>>David Abrahams wrote:
>>
>>>Tobias Schwinger <tschwinger_at_[hidden]> writes:
>>>
>>>
>>>
>>>>How about these?
>>>>
>>>> #define BOOST_COMPILER_WITH_VERSION(compiler,version) \
>>>> (compiler == version)
>>>>
>>>> #define BOOST_COMPILER_ABOVE_VERSION(compiler,version) \
>>>> (compiler > version)
>>>>
>
>
> <snip>
>
>>>No. That's what BOOST_WORKAROUND does, and BOOST_WORKAROUND does it
>>>better. Please read
>>>http://www.boost-consulting.com/boost/boost/detail/workaround.hpp
>>>
>>
>>Know it already. Personally I'm not too much into the stuff I posted either. But
>>the code shows a reasonable set of comparison operations if we encode them in the
>>macro name.
>
>
> Why should we do that when we can just write the comparison operator
> with BOOST_WORKAROUND?
>

No idea, it was part of Edward's proposal.

>
>>We might as well (which seems even better to me) take the comparison operator as
>>part of the macro argument like BOOST_WORKAROUND does:
>>
>> #define BOOST_MSVC_VERSION(test) (defined(BOOST_MSVC) && (BOOST_MSVC test))
>
>
> That's not legal code. What are you trying to accomplish that
> BOOST_WORKAROUND doesn't already provide?
>

Right. s/defined(BOOST_MSVC)/(BOOST_MSVC != 0)/

>
>>And while we're at it -- I'ld like a variant of BOOST_TESTED_AT, "BOOST_TESTED"
>>that also takes the comparison operator:
>>
>> BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED(> 1200))
>
>
> And what do you think that is supposed to do?
>

Evaluate to true if we use MSVC and the compiler version is above 1200. That is,
with the ability to detect incomplete workarounds (like BOOST_TESTED_AT). It
further allows us more flexibility to express what was tested and what wasn't when
submitting patches.

Regards,

Tobias


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