x3 bug? It cannot synthesize attribute of type boost::iterator_range in a sequence parser

wanghan02 <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
In a simple parser test  http://coliru.stacked-crooked.com/a/5b3bde9736c9fc43
<http://coliru.stacked-crooked.com/a/5b3bde9736c9fc43>  

    std::string str("x123x");
    boost::iterator_range<boost::range_iterator&lt;decltype(str)>::type>
attr;
    if( x3::parse( boost::begin(str), boost::end(str), *x3::lit('x') >>
x3::raw[+x3::digit] >> x3::lit('x')*, attr ) ) {
        std::cout<<"Match! attr = "<<attr&lt;&lt;std::endl;
    } else {
        std::cout&lt;&lt;&quot;Not match!&quot;&lt;&lt;std::endl;
    }

The highlighted code is supposed to synthesize an attribute of type
boost::iterator_range&lt;Iterator>. But it cannot compile. If we remove
either of the two x3::lit('x'), it compiles.




--
View this message in context: http://boost.2283326.n4.nabble.com/x3-bug-It-cannot-synthesize-attribute-of-type-boost-iterator-range-in-a-sequence-parser-tp4692826.html
Sent from the spirit-general mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.