|
Boost : |
Subject: [boost] [spirit][phoenix] Spirit v2 conflicts with Phoenix v3
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-07-19 10:39:36
Hi,
Recently I tried to port my code to Boost.Spirit v2 and Boost.Phoenix v3.
After including the following headers:
#include <boost/phoenix/core.hpp>
#include <boost/spirit/include/qi_core.hpp>
I got the following error:
In file included from ./boost/spirit/home/phoenix/core.hpp:13:0,
from ./boost/spirit/include/phoenix_core.hpp:14,
from ./boost/spirit/home/support/make_component.hpp:15,
from ./boost/spirit/home/support/meta_compiler.hpp:20,
from ./boost/spirit/home/qi/domain.hpp:15,
from ./boost/spirit/home/qi/parser.hpp:15,
from ./boost/spirit/include/qi_core.hpp:16,
from libs/log/src/text_file_backend.cpp:51:
./boost/spirit/home/phoenix/core/actor.hpp:46:16: error: redefinition of
âstruct boost::phoenix::detail::error_expecting_argumentsâ
./boost/phoenix/core/actor.hpp:41:16: error: previous definition of âstruct
boost::phoenix::detail::error_expecting_argumentsâ
./boost/spirit/home/phoenix/core/actor.hpp:65:12: error: redefinition of
âstruct boost::phoenix::actor<Expr>â
./boost/phoenix/core/actor.hpp:161:12: error: previous definition of âstruct
boost::phoenix::actor<Expr>â
I take it the problem is that Boost.Spirit always include Phoenix v2 which
causes name clashes with v3.
Is this a known problem? Shouldn't Boost.Spirit include Phoenix v3 headers
instead? I can see v3 redirects includes to v2 if BOOST_PHOENIX_USE_V2_OVER_V3
macro is defined (BTW, there's an error in boost/phoenix/stl.hpp:
BOOST_PHOENIX_USE_V2 macro is checked instead).
This happens in the release branch.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk