Boost C++ Libraries: Ticket #2449: tellg() not working for filtering_istream https://svn.boost.org/trac10/ticket/2449 <p> Hi, </p> <p> tellg() member function is not working for boost::iostreams::filtering_istream (see attached example). </p> <p> This means that filtering_istream cannot be treated like an std::istream without having strange effects. In my eyes this is practically a showstopper for using filtering_istream. </p> <p> Regards, </p> <p> Roland </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2449 Trac 1.4.3 rbock@… Fri, 31 Oct 2008 09:57:07 GMT attachment set https://svn.boost.org/trac10/ticket/2449 https://svn.boost.org/trac10/ticket/2449 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">IoStreams.cpp</span> </li> </ul> <p> A short sample showing that filtering_istream::tellg() does not work (and corrupts the stream). </p> Ticket Jonathan Turkanis Fri, 31 Oct 2008 18:11:32 GMT status changed https://svn.boost.org/trac10/ticket/2449#comment:1 https://svn.boost.org/trac10/ticket/2449#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Steven Watanabe Wed, 16 Jun 2010 14:35:38 GMT <link>https://svn.boost.org/trac10/ticket/2449#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:2</guid> <description> <p> The underlying device has to support seeking, for tellg to work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Wed, 16 Jun 2010 16:06:27 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2449#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:3</guid> <description> <p> After poking through the source for a while, I'm beginning to think that this behavior is by design. You can make the example work using </p> <pre class="wiki">boost::iostreams::filtering_stream&lt;boost::iostreams::input_seekable&gt; </pre> </description> <category>Ticket</category> </item> <item> <author>rbock@…</author> <pubDate>Wed, 16 Jun 2010 16:17:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2449#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2449#comment:3" title="Comment 3">steven_watanabe</a>: </p> <blockquote class="citation"> <p> After poking through the source for a while, I'm beginning to think that this behavior is by design. You can make the example work using </p> <pre class="wiki">boost::iostreams::filtering_stream&lt;boost::iostreams::input_seekable&gt; </pre></blockquote> <p> Hmm. In that case, wouldn't it be better to throw an exception with some meaningful text instead of just returning -1 and invalidating the stream (good() == false)? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Wed, 16 Jun 2010 16:41:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2449#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:5</guid> <description> <p> I get an exception with msvc-10 and the trunk. If you don't get an exception, it's probably because std::istream is swallowing it. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 17 Jun 2010 01:41:54 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2449#comment:6 https://svn.boost.org/trac10/ticket/2449#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> Ticket anonymous Mon, 20 Jan 2014 23:49:40 GMT <link>https://svn.boost.org/trac10/ticket/2449#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:7</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/2449#comment:6" title="Comment 6">steven_watanabe</a>: Hi, I tried using boost::iostreams::filtering_stream&lt;boost::iostreams::input_seekable&gt;, but, I am not able to push gzip_decompressor object into this filter (push(boost::iostreams::gzip_decompressor())). Can you please let me know if there is workaround for this. </p> <p> thanks, Edwin. </p> </description> <category>Ticket</category> </item> <item> <author>Edwin Ramayya <redwinbosco@…></author> <pubDate>Tue, 21 Jan 2014 17:31:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2449#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2449#comment:8</guid> <description> <p> Hi, Were you able to use boost::iostreams::filtering_stream&lt;boost::iostreams::input_seekable&gt; and push boost::iostreams::gzip_decompressor() into the filter. I am not able to.. please let me know how you got around this. </p> <p> thanks, Edwin. </p> </description> <category>Ticket</category> </item> </channel> </rss>