Boost logo

Boost :

From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-03-16 06:51:46


Let's not get carried away by the version stuff, let's keep
it simple.

#define BOOST_VERSION 0102101

and document that

 BOOST_VERSION % 100 is the sub-minor version
 BOOST_VERSION /100 % 1000 is the minor version
 BOOST_VERSION / 100000 is the major version

checking whether 1.21.0 or later is then as easy as

#if BOOST_VERSION >= 0102100

It should be a macro for conditional compilation purposes.

For those who want to format it nicely on the screen, they
have to do it themselves. Additionally, using my proposed
format (and the accompanying specification of the meaning)
means that people are less likely to do their check wrong
(see __GCC_MINOR__ vs __GCC_MAJOR mentioned early in this
thread).

A scheme similar to this has precedent with nearly all
compilers I know.

Jens Maurer


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