[Boost-bugs] [Boost C++ Libraries] #4684: [spirit] bad template error when complementing a rule

Subject: [Boost-bugs] [Boost C++ Libraries] #4684: [spirit] bad template error when complementing a rule
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-24 15:24:19


#4684: [spirit] bad template error when complementing a rule
-------------------------------------+--------------------------------------
 Reporter: eric_niebler | Owner: djowel
     Type: Bugs | Status: new
Milestone: Boost-1.45.0 | Component: spirit
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 The following code results in a terrible compiler error. The grammar for
 Spirit should not allow {{{~}}} to apply to a {{{rule}}} object.

 {{{
 #include <boost/spirit/home/qi.hpp>

 int main()
 {
     using namespace boost::spirit::qi;
     rule<char const *> expression, term, factor;

     expression = term >> *( ( '+' >> term ) | ( '-' >> term ) ) ;
     term = factor >> *( ( '*' >> ~factor ) | ( '/' >> factor ) ) ;
     factor = uint_ | '(' >> expression >> ')' | '-' >> factor ;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4684>
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:04 UTC