Opened 7 years ago

Closed 5 years ago

#12084 closed Feature Requests (fixed)

qi conflicts with x3

Reported by: mikhail.strelnikov@… Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.60.0 Severity: Cosmetic
Keywords: Cc:

Description

Would be nice if this compiled:

    #include <boost/spirit/home/x3.hpp>
    #include <boost/spirit/include/qi.hpp>
    int main() {}

(now it fails with error: 'kleene' does not name a type)

Change History (4)

comment:1 by ahovda@…, 6 years ago

+1

I have the same problem when trying this:

#include <boost/spirit/home/karma.hpp>
#include <boost/spirit/home/x3.hpp>

Errors out with:

boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(78): error C2039: 'changesign': is not a member of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(27): note: see declaration of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(78): error C3861: 'changesign': identifier not found
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(84): error C2039: 'changesign': is not a member of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(27): note: see declaration of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(84): error C3861: 'changesign': identifier not found
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(90): error C2039: 'changesign': is not a member of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(27): note: see declaration of 'boost::spirit::x3'
boost/spirit/home/x3/support/numeric_utils/extract_real.hpp(90): error C3861: 'changesign': identifier not found

Similar error if I flip the order of includes.

comment:2 by Enhex, 5 years ago

As I mentioned at https://github.com/boostorg/spirit/issues/257

The reason is SPIRIT_SIGN_MAR_11_2009_0734PM is already defined in:

boost\spirit\home\x3\support\numeric_utils\sign.hpp

which triggers the include guard of:

boost\spirit\home\support\detail\sign.hpp

comment:3 by Nikita Kniazev <nok.raven@…>, 5 years ago

comment:4 by Joel de Guzman, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.