Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-10-20 15:14:42


Christophe Prud'homme wrote:
> Dear Boosters,
>
> I am trying to keep some backward compatibility (for some while) for the boost
> libraries we use in our codes (ublas for example), and I find that the
> addition below to boost/version.hpp helps a lot with readability in the code
> instead of using
>
> // BOOST_VERSION % 100 is the sub-minor version
> // BOOST_VERSION / 100 % 1000 is the minor version
> // BOOST_VERSION / 100000 is the major version

There's been some recent discussions related to version numbers from the
proposal/summary I posted for normalizing version checking which is related:

http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?BoostConfig

It has a BOOST_VERSION_NUMBER macro like your BOOST_MAKE_VERSION macro.
That type of macro can already be used with the BOOST_WORKAROUND
utility. For example...

> In order to test the current version of boost:
> #if BOOST_IS_VERSION(1,33,0)
> ... write the code according to the API >= 1.33.0
> #else
> ... write the code according to the API < 1.33.0
> #endif

#if BOOST_WORKAROUND( BOOST_VERSION, >= BOOST_VERSION_NUMBER(1,33,0) )
  ...
#else
  ...
#endif

The discussions also mentioned changing BOOST_WORKAROUND to allow this:

#if BOOST_WORKAROUND( BOOST_VERSION,>=,1,33,0 )

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org

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