Boost C++ Libraries: Ticket #6248: multi_pass_iterator not flushed automatically by expectation operator https://svn.boost.org/trac10/ticket/6248 <p> Parsing a 2GB file, multi_pass_iterator throws std::bad_alloc when it tries to push_back the ~1.2GB'th item, even though expectation operator is used with a record based file whose max record length is ~200 chars. For example: </p> <blockquote> <p> start %= header &gt; *rec; </p> </blockquote> <p> I also tried: </p> <blockquote> <p> start %= header &gt; flush_multi_pass *rec; </p> </blockquote> <p> which resulted in no effect. </p> <p> note: 1.47.0 required modifying flush_multi_pass.hpp to be the same as 1.48.0 impl to avoid compilation errors </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6248 Trac 1.4.3 Antony Polukhin Fri, 15 Mar 2013 09:34:49 GMT attachment set https://svn.boost.org/trac10/ticket/6248 https://svn.boost.org/trac10/ticket/6248 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">iterator.hpp.patch</span> </li> </ul> Ticket Antony Polukhin Fri, 15 Mar 2013 09:40:51 GMT type, milestone changed https://svn.boost.org/trac10/ticket/6248#comment:1 https://svn.boost.org/trac10/ticket/6248#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> </ul> <p> <code>boost::spirit::lex::lexertl::iterator&lt;Functor&gt;</code> class has no functions specializations in traits namespace, which makes it to choose the default methods that do nothing (instead of calling <code>clear_queue</code>). </p> <p> Attached patch for boost/spirit/home/lex/lexer/lexertl/iterator.hpp that fixes it. </p> <p> P.S.: <code>boost::spirit::lex::lexertl::iterator&lt;Functor&gt;</code> also has no swap specialisation, which may lead to use of ineffective <code>std::swap</code>. </p> Ticket Joel de Guzman Fri, 15 Mar 2013 09:43:19 GMT owner changed https://svn.boost.org/trac10/ticket/6248#comment:2 https://svn.boost.org/trac10/ticket/6248#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Joel de Guzman</span> to <span class="trac-author">Hartmut Kaiser</span> </li> </ul> Ticket Hartmut Kaiser Sat, 16 Mar 2013 14:36:17 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6248#comment:3 https://svn.boost.org/trac10/ticket/6248#comment:3 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83461" title="Fix #6248: multi_pass_iterator not flushed automatically by ...">[83461]</a>) Fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6248" title="#6248: Patches: multi_pass_iterator not flushed automatically by expectation operator (closed: fixed)">#6248</a>: multi_pass_iterator not flushed automatically by expectation operator </p> Ticket