Boost C++ Libraries: Ticket #7371: boost::spirit::classic::char_parser<DerivedT>::parse is incrementing the scanner's first iterator directly instead of using the provided iterator_policy https://svn.boost.org/trac10/ticket/7371 <p> In boost\spirit\home\classic\core\primitives\primitives.hpp </p> <p> boost::spirit::classic::char_parser&lt;DerivedT&gt;::parse is defined to increment the scanner's first iterator directly instead of using the provided iterator_policy. </p> <p> I'm using a scanner with an iterator that doesn't have a ++ operator and provided an iteration policy with redefined advance, get, and at_end methods. </p> <p> This works fine if the following patch is implemented in boost\spirit\home\classic\core\primitives\primitives.hpp: </p> <p> </p> <pre class="wiki"> if (!scan.at_end()) { value_t ch = *scan; if (this-&gt;derived().test(ch)) { iterator_t save(scan.first); - ++scan.first; + ++scan; return scan.create_match(1, ch, save, scan.first); } } </pre><p> This patch forwards the increment request to scanner_policies&lt;streamer_policy&gt;::advance to let it do its thing with scan.first </p> <p> I've seen this (and corrected it locally) at least in boost.sprit from boost version 1.40.0 and 1.51.0 </p> <p> Can somebody with RW access to boost.spirit implement this? Or tell me I should adapt my iterator objects directly. </p> <p> I'm new to GIT and not a spirit developer, but I can try to make a git pull request if that is the way to send-in change requests. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7371 Trac 1.4.3 mhilferink@… Thu, 13 Sep 2012 12:22:06 GMT attachment set https://svn.boost.org/trac10/ticket/7371 https://svn.boost.org/trac10/ticket/7371 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">primitives.hpp.patch</span> </li> </ul> <p> here's the patch </p> Ticket Nikita Kniazev <nok.raven@…> Sat, 23 Dec 2017 00:28:36 GMT <link>https://svn.boost.org/trac10/ticket/7371#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7371#comment:1</guid> <description> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/spirit/pull/336"><span class="icon">​</span>https://github.com/boostorg/spirit/pull/336</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Sat, 23 Dec 2017 00:38:11 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7371#comment:2 https://svn.boost.org/trac10/ticket/7371#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket