Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2003-12-18 00:49:00


Robert Ramey wrote:
> One more thing:
>
> perhaps spirit config.hpp might define a macro
>
> #define SPIRIT_VERSION 16 or 18
>
> This might be helpful. If someone makes component
> that depends on one version and attempt to use another
> one could be trapped.
>
> Now that I think about it, that might be a worthy idea
> for other large and complex libraries such as mpl and
> perhaps others.

There always has been a SPIRIT_VERSION. Currently it's 0x1800
The latest 1.6.x is 0x1601. However, it is placed in the master
header file at boost/spirit.hpp, and, thinking about it now, is
not a good place at all. I tweaked it such that it is placed in
boost/spirit/core.hpp which is the most included header of all.
You don't want to include the master boost/spirit.hpp file. It will
include everything.

The actual version.hpp file has been added to 1.8.0 but you don't
want that because older versions do not have it. I think that the
best way to keep track of the version is to:

1) include boost/spirit/core.hpp
2) Check if SPIRIT_VERSION is defined
3) If defined, check if it is 0x1800 or greater
4) If not defined, then it should be < 0x1800

<<This assumes that you will not support Spirit 1.7.0, and you
shouldn't because it is an unstable developmental version>>

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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