Boost C++ Libraries: Ticket #12208: Lexer does not work with boost::spirit::istream_iterator https://svn.boost.org/trac10/ticket/12208 <p> According to the documentation, any forward iterator should be usable for the input stream iterator. boost::spirit::istream_iterator is a forward iterator, yet I find boost::wave::lexing_exception is called when it is used instead of std::string_iterator. Further, the Changelog has this to say: </p> <p> TODO (known issues): ... </p> <ul><li>Fix the re2c lexer for iterators others then string::iterator (or more generally for iterators, which aren't random access iterators) </li></ul><p> which implies that this is a known problem. </p> <p> Either the documentation should indicate that a random access iterator is required (and this should be enforced with an iterator traits check), or the code should be fixed to only require a forward iterator. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12208 Trac 1.4.3 edaskel@… Mon, 16 May 2016 06:14:59 GMT attachment set https://svn.boost.org/trac10/ticket/12208 https://svn.boost.org/trac10/ticket/12208 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">wave_testcase1.cpp</span> </li> </ul> <p> test case demonstrating a failure with forward iterator </p> Ticket edaskel@… Thu, 26 Oct 2017 21:20:40 GMT <link>https://svn.boost.org/trac10/ticket/12208#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12208#comment:1</guid> <description> <p> So the issue is basically <a class="ext-link" href="https://github.com/boostorg/wave/blob/develop/include/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp#L129"><span class="icon">​</span>here</a>. We take the address of the first element of the input and assume the rest is lined up in memory behind it. I'm looking at solutions - the most obvious is to make a copy, but Wave already makes one copy of the input and I'm not convinced even that should be necessary. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 24 Nov 2017 23:29:03 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12208#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12208#comment:2</guid> <description> <p> This issue was resolved by merging <a class="ext-link" href="https://github.com/boostorg/wave/pull/21"><span class="icon">​</span>https://github.com/boostorg/wave/pull/21</a> and may be closed. </p> </description> <category>Ticket</category> </item> </channel> </rss>