|
Boost Users : |
Subject: Re: [Boost-users] [iostreams] How to make a seekable device seek
From: Daniel Eiband (eiband_at_[hidden])
Date: 2010-04-30 14:53:59
Hi, what happens when you try to seek to another position than 0:
buf.seekg(100);
I remember seeing code (and a resolved bug too) that optimizes no-seeks.
Your position was probably 0 before the call.
Kind regards,
Daniel
Am 30.04.2010 01:10, schrieb Bo Jensen:
> I have a seekable iostream device with the tag set to :
>
> typedef boost::iostreams::input_seekable catagory;
>
> If I have not defined the functions get and seek, it will not compile,
> which is expected, so far so good.
> But when I called it like this :
>
> mydevice test("somefile.txt");
>
> boost::iostreams::stream<mydevice> buf(test);
>
> buf.seekg(0);
>
> it never enters my seek function, which I would expect. I am sure the
> solution must be obvious. Any pointers here ?
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net