Boost logo

Boost Users :

Subject: [Boost-users] compilation problems on spirit::karma
From: Erik Thiele (erik.thiele_at_[hidden])
Date: 2012-09-20 10:02:27


Hello

in the attachment there is a single c++ file.

on debian squeeze with g++ (Debian 4.4.5-8) 4.4.5 it compiles. debian
standard libboost1.42-dev is installed. if you run the program:

erik_at_ludwig:~/allesfresser/karma_problem$ ./a.out
ruleSetModal(subCall(projectMemberIdentifier(siemensAltNumber=100,
fanucNumber=0, name=))
erik_at_ludwig:~/allesfresser/karma_problem$

that's the required behaviour.

now on new system with g++ (Debian 4.7.1-7) 4.7.1, and libboost1.49-dev,
it does not compile. a short excerpt of the enormously long chain of
error message:

problem.cpp:254:5: required from
‘astGenerate<OutputIterator>::astGenerate() [with OutputIterator =
std::back_insert_iterator<std::basic_string<char> >]’
problem.cpp:307:56: required from here
/usr/include/boost/spirit/home/support/attributes.hpp:519:28: error:
cannot convert ‘const boost::variant<astProjectMemberIdentifier,
astErikNcBohrPlanSenk>’ to
‘boost::spirit::traits::attribute_size<boost::optional<boost::variant<astProjectMemberIdentifier,
astErikNcBohrPlanSenk> >, void>::type {aka unsigned int}’ in return

if you remove the rule in line 254 (ruleSetModal = "ruleSetModal(" <<
-ruleSubCall << ')';), then the program will compile. but it will output
nothing of course. i need this line. it worked all the times and now
after update it does not work.

honestly i do not understand the long chain of error message. i checked
with boost 1_51_1 with the same not working result. also with clang++
compiler it does not work with the same error message. maybe someone on
the list can enlighten me why this does not compile anymore.

Thanks
Erik




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