[iostreams] restriction device/filter
Hello, I'm looking at the implementation of the "restriction" device, from Boost.Iostreams library, which provides access to a subsequence of the original device. When it reaches the end of the input subsequence, the restriction device start performing read()'s of size zero on the original device. Shouldn't it be returning an end-of-sequence marker (EOF) instead? I am using a restriction device as source parameter for the iostreams::copy function and this always results in an infinite loop. Am I doing something wrong? Thanks! - Borko
boost-users-bounces@lists.boost.org wrote:
Hello,
I'm looking at the implementation of the "restriction" device, from Boost.Iostreams library, which provides access to a subsequence of the original device.
When it reaches the end of the input subsequence, the restriction device start performing read()'s of size zero on the original device. Shouldn't it be returning an end-of-sequence marker (EOF) instead?
I am using a restriction device as source parameter for the iostreams::copy function and this always results in an infinite loop. Am I doing something wrong?
Thanks!
- Borko
Hi Borko, which version of boost do you use? I'm asking because I very much rely on iostream::restrict device and never had any issues so far. That is up to boost 1.41 because we have not moved to a newer version yet. I find it annoying that nobody ever answers questions related to boost::iostreams. Regards, -- Christian Pfligersdorffer Software Engineering http://www.eos.info
Hi. I'm using version 1.44. What happens in version 1.41 when you do a read past the restricted size (area)?
Hi Borko,
which version of boost do you use? I'm asking because I very much rely on iostream::restrict device and never had any issues so far. That is up to boost 1.41 because we have not moved to a newer version yet.
On 2/18/2011 4:21 AM, Borko Jandras wrote:
Hi.
I'm using version 1.44. What happens in version 1.41 when you do a read past the restricted size (area)?
Hi Borko,
which version of boost do you use? I'm asking because I very much rely on iostream::restrict device and never had any issues so far. That is up to boost 1.41 because we have not moved to a newer version yet.
Quite a number of iostreams bug fixes were implemented and committed for the 1.44 release. Could be a regression?? Could you post a small test code sample demonstrating the problem so someone can help evaluate it? The next step (assuming it turns out to be a bug) would be to create a ticket describing the problem. This is done at https://svn.boost.org/trac/boost/newticket
participants (3)
-
Borko Jandras
-
eg
-
Pfligersdorffer, Christian