[Boost-bugs] [Boost C++ Libraries] #8556: Cannot combine synthesized attributes with semantic actions in some cases

Subject: [Boost-bugs] [Boost C++ Libraries] #8556: Cannot combine synthesized attributes with semantic actions in some cases
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-08 23:55:57


#8556: Cannot combine synthesized attributes with semantic actions in some cases
---------------------------------------+------------------------------------
 Reporter: Jeff Trull (@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
---------------------------------------+------------------------------------
 The use of "%=" in rule definitions appears intended to permit
 simultaneous use of semantic actions and synthesized attributes. However,
 in some cases I find I can choose only one. In particular a rule of this
 form:

 rule<Iterator, std::vector<std::string>()> r;
 r = qi::string >> qi::string >> qi::string;

 successfully synthesizes its attribute, while the same rule defined this
 way:

 r = (qi::string >> qi::string >> qi::string)[SA]

 successfully compiles and runs its semantic action. However, combining
 them fails:

 r %= (qi::string >> qi::string >> qi::string)[SA]

 produces a compile error. Test case attached.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8556>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC