Re: x3 bug? It cannot synthesize attribute of type boost::iterator_range in a sequence parser
Seth <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
For info, this is a cross post from this Stackoverflow question, which
doesn't have the formatting issues:
http://stackoverflow.com/q/42955312/85371
On 23-03-17 09:50, wanghan02 wrote:
> 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<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<<std::endl;
> } else {
> std::cout<<"Not match!"<<std::endl;
> }
>
> The highlighted code is supposed to synthesize an attribute of type
> boost::iterator_range<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
> _______________________________________________
> Spirit-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/spirit-general
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot