|
Boost : |
Subject: Re: [boost] [Predef] Splitting a version number into components
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2014-06-04 15:31:39
On Wed, Jun 4, 2014 at 11:09 AM, Arindam Mukherjee <
arindam.mukerjee_at_[hidden]> wrote:
> On Wed, Jun 4, 2014 at 8:07 PM, Rene Rivera <grafikrobot_at_[hidden]> wrote:
>> On Tue, Jun 3, 2014 at 2:42 PM, Arindam Mukherjee <
>> arindam.mukerjee_at_[hidden]> wrote:
>>
>>> Given some vendor version number, is there any macro in Predef to
>>> split it into major, minor and patch components?
>>>
>>
>> Could you provide a more specific example of what you want to do? Do you
>> want to split the original/raw vender version number? Or a Predef
>> normalized version number? Why do you need the individual components?
>>
>
> I sort of figured after I asked the question that version components
> have little meaning in isolation and comparisons with a numeric
> version constructed using BOOST_VERSION_NUMBER() is enough. Is that
> the correct understanding?
Yes. That's correct.
>>> I noticed the macros BOOST_PREDEF_MAKE_* macros. What do these macros
>>> help achieve which BOOST_VERSION cannot?
>>>
>>
>> Not sure what you mean by that question. the MAKE macros translate from
>> vendor specific version number(s) to a Predef normalized version number.
>>
>
> So given a numeric vendor version in a certain format, using the MAKE_
> macro for that format translates it to 2.2.5 format, right? When does
> one choose to use normalized versions? Is it to be able to compare
> with BOOST_VERSION_NUMBER?
Yes, the MAKE macro is to be able to compare with BOOST_VERSION_NUMBER
defined values.
-- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk