[Predef] Splitting a version number into components
Given some vendor version number, is there any macro in Predef to split it into major, minor and patch components? I noticed the macros BOOST_PREDEF_MAKE_* macros. What do these macros help achieve which BOOST_VERSION cannot? Thanks, Arindam
On Tue, Jun 3, 2014 at 2:42 PM, Arindam Mukherjee < arindam.mukerjee@gmail.com> 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 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. -- -- Rene Rivera -- Grafik - Don't Assume Anything -- Robot Dreams - http://robot-dreams.net -- rrivera/acm.org (msn) - grafikrobot/aim,yahoo,skype,efnet,gmail
On Wed, Jun 4, 2014 at 8:07 PM, Rene Rivera
On Tue, Jun 3, 2014 at 2:42 PM, Arindam Mukherjee < arindam.mukerjee@gmail.com> 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
On Wed, Jun 4, 2014 at 11:09 AM, Arindam Mukherjee < arindam.mukerjee@gmail.com> wrote:
On Wed, Jun 4, 2014 at 8:07 PM, Rene Rivera
wrote: On Tue, Jun 3, 2014 at 2:42 PM, Arindam Mukherjee < arindam.mukerjee@gmail.com> 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
participants (2)
-
Arindam Mukherjee
-
Rene Rivera