Boost logo

Boost Users :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-08-09 15:02:46


Ovanes Markarian wrote:
> Hello,
>
> I am using fusion v2 in my project and first would like to thank for the great lib. I installed
> this lib into the boost/fusion directory.
>
> Today I started using xpressive lib (which is also a great one!!!). Unfortunately xpressive broke
> my compilation, because it includes things from boost/spirit/fusion and my code includes headers
> from boost/fusion. Now my assumption: AFAIK spirit/fusion contains version 1. Since I would like
> to use version 2 I can not simply copy it into the spirit directory, since it can break other
> things like wave. Is it correct? If yes, does anyone have suggestions on how I should deal with
> this issues?

I can infer from this that you're using boost 1.34.1 or earlier, and
you've copied boost.fusion from svn HEAD into the tree, right? Xpressive
isn't expecting to find Fusion v2 in Boost 1.34, hence the problem.
You'll need to hack on xpressive a bit to make this work. In
xpressive_fwd.hpp, you should add something like

#if BOOST_VERSION >= 103500
#ifndef BOOST_XPRESSIVE_FUSION_V2
#define BOOST_XPRESSIVE_FUSION_V2
#endif
#endif

Then everywhere xpressive conditionally includes fusion v1 or v2, you
should check BOOST_XPRESSIVE_FUSION_V2 instead of the boost version.
You'll need to do something similar in proto_fwd.hpp (#define
BOOST_PROTO_FUSION_V2) and all of proto's headers. Then you'll be ableto
force the issue by compiling with BOOST_XPRESSIVE_FUSION_V2 and
BOOST_PROTO_FUSION_V2 defined.

If you do all this and submit a patch, I'll accept it.

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net