Opened 6 years ago
Closed 5 years ago
#12928 closed Bugs (fixed)
x3 cannot synthesize attribute of type boost::iterator_range in a sequence parser
| Reported by: | Owned by: | Joel de Guzman | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | spirit |
| Version: | Boost 1.63.0 | Severity: | Problem |
| Keywords: | x3, attribute, iterator_range, sequence | Cc: |
Description
In a simple parser test 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;
}
x3::lit('x') >> x3::raw[+x3::digit] >> x3::lit('x') 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.
Change History (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Should be fixed in https://github.com/boostorg/spirit/pull/316