[spirit2] conflict with asio header

I'm not certain if this is an asio issue or spirit2 issue (or user error). I checked Spirit out from the trunk and placed it into a 1.37 boost tree. I'm running gcc 4.3.2. Creating file foo.cpp with the following: --------------- #include <boost/asio.hpp> #include <boost/spirit/include/qi.hpp> --------------- Produces a string of errors including this snippet: from ../src/foo.cpp:3: ../../../library/vendor/boost/boost/proto/make_expr.hpp: At global scope: ../../../library/vendor/boost/boost/proto/make_expr.hpp:935: error: expected nested-name-specifier before numeric constant ../../../library/vendor/boost/boost/proto/make_expr.hpp:935: error: expected â>â before numeric constant ../../../library/vendor/boost/boost/proto/make_expr.hpp:940: error: type/value mismatch at argument 3 in template parameter list for âtemplate<class Tag, class DomainOrA0, class A0, class A1, class A2, class A3, class A4, class Void> struct boost::proto::result_of::make_exprâ ../../../library/vendor/boost/boost/proto/make_expr.hpp:940: error: expected a type, got â0â ../../../library/vendor/boost/boost/proto/make_expr.hpp:940: error: expected initializer before âconstâ Swapping the include order resolves the error. Should I enter a ticket? Michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com

Michael Caisse wrote:
I'm not certain if this is an asio issue or spirit2 issue (or user error).
This is due to an identifier conflict (on "B0") between a Linux system header (included by asio) and Proto (included by Spirit2). A "#undef B0" between the inclusions of ASIO and Spirit2 should also fix the issue. FYI, Boost 1.39 which no longer exhibits this behavior. HTH, François
participants (3)
-
Francois Barel
-
Hartmut Kaiser
-
Michael Caisse