Boost logo

Boost :

From: Michiel Salters (Michiel.Salters_at_[hidden])
Date: 2001-03-16 07:29:41


What do you think 0102101 / 100000 is ?

Hint: it isn't 01

Michiel Salters

> -----Original Message-----
> From: Jens Maurer [mailto:Jens.Maurer_at_[hidden]]
> Sent: Friday, March 16, 2001 12:52 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: Version #defines?
>
>
>
> 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
>
> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/


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