id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8577,Multiple qi::match calls on the same stream corrupt input data,Vadim Guchenko ,Joel de Guzman,"qi::match cannot be reliably called multiple times on the same input stream. Probably it consumes some characters from the stream to do look-ahead but doesn't return them back to the stream on destruction. So it only works reliably if it's the last extraction operator for a given stream. I know there may be problems to return more than one character to a stream, so if it's the expected qi::match behavior, it's worth to be mentioned in the documentation. The following code illustrates the problem: {{{ #include #include #include #include namespace qi = boost::spirit::qi; int main() { std::istringstream is(""11 22 33 44 55 ""); is >> std::noskipws; int n = 0; for (int i = 0; i < 5; ++i) { is >> qi::match(qi::int_ >> +qi::lit(' '), n); assert(is); std::cout << n << ' '; } } }}} {{{ Expected output: 11 22 33 44 55 Actual output: 11 2 3 4 5 }}} ",Bugs,closed,To Be Determined,spirit,Boost Development Trunk,Problem,invalid,,