From: Jens Maurer (Jens.Maurer_at_[hidden])
Date: 2001-03-16 10:25:20
I've overlooked that 0102101 is an octal constant indeed.
Thanks for telling me, Michiel. So the constant should
probably be 102101 for 1.21.1 instead (truly decimal now).
Hex constants have the problem that we'd have to use
BCD (binary coded decimal) notation to keep the version
number readable in the source. But then it's hard to
extract its parts easily. No, (0x0102101 & 0xff00) >> 8
does not give the value "21".
Regarding the "forward compatibility" issue
#if BOOST_VERSION < xxx
Imagine the following situation: You're writing a third-party
non-boost library which relies on the boost library being
installed. You know that your library triggers a subtle bug in
boost which got fixed with version xxx only, so you'd want to
prevent your users from compiling your library with the buggy
boost library versions.
This alone seems reason enough for me to provide a version
indication the compiler can evaluate.
Additionally, for backward compatibility, there were situation
where we changed boost interfaces (see the recent Python
ptr_to_python thread for an example involving a function from
detail, but you get the idea). If you want to keep your code
working with a few recent versions of boost, you'd want to
differentiate and choose between the interfaces for a
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk