Boost logo

Boost :

Subject: Re: [boost] [Predef] Splitting a version number into components
From: Arindam Mukherjee (arindam.mukerjee_at_[hidden])
Date: 2014-06-04 12:09:02


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?

>
>> 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?

Regards,
Arindam


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