Re: [Boost-bugs] [Boost C++ Libraries] #12094: Operator > changes attribute type

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12094: Operator > changes attribute type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-25 16:35:42


#12094: Operator > changes attribute type
-----------------------------------+----------------------
  Reporter: mikhail.strelnikov@… | Owner: djowel
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: spirit
   Version: Boost 1.61.0 | Severity: Problem
Resolution: | Keywords:
-----------------------------------+----------------------

Comment (by mikhail.strelnikov@…):

 Why this works?

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

 #include <string>

 using namespace boost::spirit::x3;

 auto r = rule<class r, std::string>{} = +char_;
 auto r_or_r = rule<class r, std::string>{} = r | r;
 auto expect_r_or_r = rule<class r, std::string>{} = expect[r_or_r];
 auto a_expect_r_or_r = rule<class r, std::string>{} = 'a' > expect_r_or_r;


 int main()
 {
     std::string input = "a";

     std::string output;

     auto b = std::begin(input);
     auto e = std::end(input);

     parse(b, e, a_expect_r_or_r, output);
 }

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12094#comment:11>
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:19 UTC